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

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

  •  14-07-2023
  •  | 
  •  

Pregunta

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?

¿Fue útil?

Solución

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

Explanation: Because markdown partially supports HTML.

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

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top