Possible bug in handling of HTML comments

Fletcher T. Penney fletcher at fletcherpenney.net
Sun Jan 13 20:06:50 EST 2008


It appears that Markdown will process ampersands contained within HTML
comments if that comment is part of a markdown paragraph, but will not
when that paragraph is contained within an HTML block of it's own (and
therefore ignored by Markdown.)

For example:

This is a markdown paragraph with a comment that *will* be processed
<!-- This & *will* be converted -->

<p><!-- This & will *not* be converted --></p>

It seems to me that the & within a comment should be ignored by
Markdown and not converted to &amp;


The reason this is important for me, is that I am experimenting with
using HTML comments as a means to pass text that should be ignored by
MultiMarkdown (e.g. to allow raw LaTeX, etc). But some of the
comments *are* being processed, which screws them up.


Thanks for any insight, and ideas on how to fix this!


Fletcher Penney


--
Fletcher T. Penney
fletcher at fletcherpenney.net

Without question, the greatest invention in the history of mankind
is beer. Oh, I grant you that the wheel was also a fine invention,
but the wheel does not go nearly as well with pizza.
- Dave Barry

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2437 bytes
Desc: not available
Url : <http://six.pairlist.net/pipermail/markdown-discuss/attachments/20080113/f213fb1b/attachment.bin>


More information about the Markdown-Discuss mailing list