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