As answers to this Stack Overflow question
reveal, using <!---
and --->
or <!--
and -->
works (view source by clicking "Raw"):
How about commenting out <!--- just ---> a part of one line?
If you know of a way, please show me how by cloning this Gist, or commenting below!
As several commenters pointed out, for inline commenting <!-- a normal html comment -->
now works.
You can't see this:
Btw, wow, I created this gist in 2014 and only now became aware of the discussion and that it's the top Google hit for markdown comments github. 👍
For whole line and multiline comments, this tweak of Rowe's suggestion appears to work for
mdcat
,VS Code
, Gist preview, and online markdown editors I've tried:Indenting the
[
bracket of the comment 4 or more spaces will make the line be rendered as a pre-formatted block and make the comment visible. Personally, I like the compact version better than the<!-- ... -->
for multiline comments, but this trick isn't supported by most syntax highlighters.