How to add code comments in markdown that DO NOT render into html? [duplicate]

StackOverflow https://stackoverflow.com/questions/23422898

  •  14-07-2023
  •  | 
  •  

I want to include comments (aka code comments) to my markdown.

Something like this

// I want this line to not render in the html

I've tried the different approaches that javascript uses but they all render as normal text and show in the final markup.

What's the nicest way I could achieve comment like functionality?

有帮助吗?

解决方案

< !-- *comment* --/> should work

Explanation: Because markdown partially supports HTML.

Its syntax is very small, corresponding only to a very small subset of HTML tags1.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top