


I’ve read that some people have no idea why someone would want to create comments in Markdown text, and to that I reply, “Try writing a book.”Īs a summary, I can confirm that this fake Markdown comment syntax works with both MacDown and Pandoc.

This syntax is ugly and I’ll never remember it, but I guess that’s what macros are for. : # (It’s a little bizarre, but it works with MacDown and Pandoc.)Īs they note on that SO page, this approach uses an “unintended side effect of the use of YAML for metadata, but it works.” Part 2 of the answer is that a user on Stack Overflow came up with this way to create Markdown comments that won’t appear in generated output: : # (This syntax works like a comment, and won't appear in any output.) Solution: A trick to create Markdown comments I know that Pandoc and MacDown will both include your comments in the HTML output they generate. The bad part about using an HTML comment is that most Markdown-to-HTML conversion tools keep those comments in the output you generate. Part 1 of my answer is that technically there is no way - or at least no standard way - to create comments in Markdown documents, other than to use HTML comments like this: Markdown FAQ: How do I create comments in Markdown? Especially comments that won’t appear in the generated output.
