Markdown comments

John Gruber gruber at fedora.net
Sun Sep 17 19:36:55 EDT 2006


Also, it does not seem to me that XML advocates the simple
interpretation of the <!-- --> comment rule.

The XML spec says:

For compatibility, the string "--" (double-hyphen) must not
occur within comments.

And this Netscape DevEdge article expounds upon that, pointing out
that a comment like this:

<!-- this -- that -->

is apparently not valid XML.

This makes the XML commenting rules simpler than SGML's, but also
means that certain valid SGML comments, such as:

<!-- this -- -- that -->

are *not* valid XML.

On the one hand, I'm thinking Markdown shouldn't worry about this.
On the other, I'm thinking Markdown shouldn't generate invalid XML
if it can be helped.

-J.G.


More information about the Markdown-Discuss mailing list