Markdown comments

Michel Fortin michel.fortin at michelf.com
Sun Sep 17 21:00:18 EDT 2006


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


> Michel Fortin <michel.fortin at michelf.com> wrote on 9/16/06 at 5:23 PM:

>

>> * Changed the parsing of HTML comments to match simply from

>> `<!--` to `-->` instead using of the more complicated

>> SGML-style rule with paired `--`. This is how most browsers

>> parse comments and how XML defines them too.

>

> Interesting. I had no idea that SGML comment rules were being

> officially or semi-officially abandoned for HTML parsers. I

> certainly welcome this change.

>

> [...]

>

> I'd like to make this change to Markdown, because I genuinely

> believe HTML comments *should* follow the simple, obvious rule,

> not the SGML rules.


I think a good post about this comes from Ian Hickson, which was once
the big advocate of SGML-style comments. He now has reverted his
stance on the matter.

<http://ln.hixie.ch/?start=1137799947&count=1>

Ian is now leading the WhatWG's Web Application 1.0 spec, which, when
merged with Web Forms 2, will probably become HTML5 under the newly-
formed [W3C Web Application Format Working Group][1]. The new draft
specification defines comments the same way as XML, the only
difference being that the new well-defined HTML parsing rules
tolerates the ill-formed double dash in comments instead of issuing a
parse error and stop parsing.

[1]: http://www.w3.org/2006/appformats/



> But I'd feel better about making this change in Markdown if Gecko

> were on board.


I certainly hope they switch back to simple comments. But seeing how
things go I think it is just a matter of time now, although I do
notice that Firefox 2.0b1 hasn't changed yet.


Michel Fortin
michel.fortin at michelf.com
http://www.michelf.com/




More information about the Markdown-Discuss mailing list