Skip to content

Instantly share code, notes, and snippets.

@boweiliu
Forked from jonikarppinen/markdown-comments.md
Created January 27, 2023 20:17
Show Gist options
  • Save boweiliu/e5af9966654b338b2b3507abfdfff5e5 to your computer and use it in GitHub Desktop.
Save boweiliu/e5af9966654b338b2b3507abfdfff5e5 to your computer and use it in GitHub Desktop.
How to comment out stuff in Markdown on GitHub?

Comments in GitHub flavour of Markdown

As answers to this Stack Overflow question reveal, using <!--- and ---> or <!-- and --> works (view source by clicking "Raw"):

Inline comments

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!

Update 2019

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. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment