Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

As far as I understand it, Markdown is a superset of HTML (with some caveats). So Markdown does have comments, they're the same as HTML comments.

From https://daringfireball.net/projects/markdown/syntax

> For any markup that is not covered by Markdown’s syntax, you simply use HTML itself. There’s no need to preface it or delimit it to indicate that you’re switching from Markdown to HTML; you just use the tags.

> The only restrictions are that block-level HTML elements — e.g. <div>, <table>, <pre>, <p>, etc. — must be separated from surrounding content by blank lines, and the start and end tags of the block should not be indented with tabs or spaces. Markdown is smart enough not to add extra (unwanted) <p> tags around HTML block-level tags.



No, it's still an HTML comment - it will be present in the output generated from Markdown. If it was Markdown comment, it wouldn't show up in the output.


If that is a feature or a bug depends on perspective and if a Markdown renderer strips HTML comments or not is an option for many of them.

(That said, I do miss the reStructuredText comments sometimes in Markdown, but partly because the syntax was so simple.)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: