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

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

  •  14-07-2023
  •  | 
  •  

Question

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?

Était-ce utile?

La solution

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

Explanation: Because markdown partially supports HTML.

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

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top