Markdown comments

A. Pagaltzis pagaltzis at gmx.de
Tue Sep 19 21:13:23 EDT 2006


* John Gruber <gruber at fedora.net> [2006-09-19 08:25]:

> Michel Fortin <michel.fortin at michelf.com> wrote on 9/18/06 at 6:26 PM:

> >I note that your backslash-"escape" method ensure that we are

> >able to reconstruct the comment in its original form. Any

> >reason this would be needed? If that's not needed then there

> >is no need to escape already existing backslashes.

>

> I can't think of a good reason, but I hate to destroy data. I

> figure just because I think think of a good reason now to make

> this transformation reversible doesn't mean I, or some other

> Markdown user, won't think of one eventually.


If someone does come up with a compelling reason, you are
entirely at liberty to switch from a lossy transformation to a
lossless one, as long as future versions of Markdown parse HTML
comments the same way and make the same promises about them (ie.
either they’ll be made well-formed or they’ll be left alone).

Changes to the generated output won’t affect anyone but people
trying to roundtrip back to Markdown, who are the only ones who’d
ask for a lossless transformation in the first place. So not only
doesn’t there seem to be a need for a complex solution, there
doesn’t seem to be any for worrying about changing the rules down
the line either.

In fact, I’d go so far as to say that the precise output is an
implementation detail where different implementations of Markdown
may behave differently. If someone really needs roundtripping
they can pick their own comment munging scheme that complies with
the basic promises of Markdown.

The simpler, the better.

Regards,
--
Aristotle Pagaltzis // <http://plasmasturm.org/>


More information about the Markdown-Discuss mailing list