On 14 Jan 2008, at 02:08, Fletcher T. Penney wrote:
It appears that the _EncodeAmpsAndAngles routine is being run over the comments, converting & and < to the HTML markup.I tried adding & and < to $g_escape_table, and then protecting them. This seemed to work, but caused other problems and is clearly not a viable solution.So it looks like there would have to be a specific mechanism in place for leaving comments alone, am I correct?
Yep, totally correct.I'm about to add this into Text::MultiMarkdown (will be in the 1.0.8 release on CPAN in a week or two) - I've attached the diff that I've made to make this work (and test it).
Please yell if you can think of a better / prettier / quicker way of doing it? ;)
It's another case that shows up how building a parse tree would be a better approach (as we wouldn't need to do, then undo the encoding) - but what I have appears to work right now...
Cheers Tom
ampsandanglesinhtmlcomments.diff
Description: Binary data
_______________________________________________ Markdown-Discuss mailing list Markdown-Discuss@six.pairlist.net http://six.pairlist.net/mailman/listinfo/markdown-discuss