Wolfgang Faust
2013-Jun-28 15:55 UTC
Mysterious MD5ification under very specific circumstances
I was building a markdown document today when my document suddenly went blank. When I looked at the HTML source, I found that all my codeblocks had been MD5ified. The following is a minimal document which reproduces the error: # Header # <!-- There can be text here, but there doesn't have to be.>> -->This is a codeblock. **Bold text** <!-- Another comment --> In particular, there must be: - A header - A comment containing the sequence NEWLINE TAB followed by at least two greater-than signs - At least one codeblock - Bold text - Another comment at the end of the document. Changing even the smallest detail in the markdown results in a correct HTML document, as expected. When I run this through markdown v.1.0.1, I get: <h1>Header</h1> <!-- 702c6078df02d6d43aa6003f415a0408 </blockquote> 46815d21b36c42e3ef8dcf757dd5758a **Bold text** <!-- Another comment --> What on earth is going on here, and who do I report this bug to? -------------- next part -------------- An HTML attachment was scrubbed... URL: <six.pairlist.net/pipermail/markdown-discuss/attachments/20130628/c402b113/attachment.html>
Waylan Limberg
2013-Jun-28 16:32 UTC
Mysterious MD5ification under very specific circumstances
Wolfgang, Which implementation of the markdown parser are you using? Perl, php, ruby, python, javascript, ... (and many more) and which version specificly? Ask to an explaination, some implementations of the parser use MD5 Hashes as placeholders for the already parsed pieces of the document. My guess is that you found an edge case which tripps up the code that swaps out the placeholders for the parsed html. Waylan Limberg waylan at gmail.com On Jun 28, 2013 11:55 AM, "Wolfgang Faust" <wolfgangmcq at gmail.com> wrote:> I was building a markdown document today when my document suddenly went > blank. When I looked at the HTML source, I found that all my codeblocks had > been MD5ified. The following is a minimal document which reproduces the > error: > > # Header # > <!-- There can be text here, but there doesn't have to be. > >> --> > > This is a codeblock. > > **Bold text** <!-- Another comment --> > > In particular, there must be: > > - A header > - A comment containing the sequence NEWLINE TAB followed by at least > two greater-than signs > - At least one codeblock > - Bold text > - Another comment at the end of the document. > > Changing even the smallest detail in the markdown results in a correct > HTML document, as expected. > > When I run this through markdown v.1.0.1, I get: > <h1>Header</h1> > > <!-- > > > 702c6078df02d6d43aa6003f415a0408 > > > </blockquote> > > > > 46815d21b36c42e3ef8dcf757dd5758a > > > > **Bold text** <!-- Another comment --> > > What on earth is going on here, and who do I report this bug to? > > _______________________________________________ > Markdown-Discuss mailing list > Markdown-Discuss at six.pairlist.net > six.pairlist.net/mailman/listinfo/markdown-discuss > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <six.pairlist.net/pipermail/markdown-discuss/attachments/20130628/4e389654/attachment.html>