Markdown comments

Michel Fortin michel.fortin at
Sun Sep 17 21:51:47 EDT 2006

Le 17 sept. 2006 à 19:36, John Gruber a écrit :

> Also, it does not seem to me that XML advocates the simple

> interpretation of the <!-- --> comment rule.

Indeed, I left out the detail that XML comments cannot have a double
hyphen in them as I didn't see that as an argument either for or
against switching the matching rule. Valid XML comments *are* valid
SGML comments and will match correctly using either.

The question is what to do about invalid XML comments.

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

Maybe Markdown should do something about double-hyphens inside
comments. This way, a user could comment out any piece of Markdown
text -- like this paragraph -- without having to worry about the
double hyphens it contains.

As a downside, it may encourage some people to write badly-formed XML
and HTML comments elsewhere on the web.

Michel Fortin
michel.fortin at

More information about the Markdown-Discuss mailing list