buggy HTML from nested lists w/ paragraphs
bobtfish at bobtfish.net
Sun Apr 6 06:40:18 EDT 2008
On 6 Apr 2008, at 05:45, Tom Humiston wrote:
> I ran into a weird problem while writing my own little guide to
> Markdown (using Markdown, of course). The document is mostly made
> of list items in nested ul's. As I neared the end, I found (via
> MarsEdit's preview) that in place of two sections of content,
> Markdown had begun to generate gibberish strings like this:
> After weeding through different sections of my text to find an
> offending pattern (and even using TextWrangler to search for stray
> Unicode and the like), I found that it seems to result from a
> particular sequence, or type of sequence, involving headers, list
> items, and paragraphs, regardless of their content.
> With all non-offending content weeded out, and 'text(n)'
> substituted for each line of actual content, I'm left with the text
> below, still generating the two errors. Each line of code has a
> blank line above it. Removing the blank lines or the final item,
> text13, is enough to kill either or both of the errors, while
> removal of other items kills one error or the other. (Removal of
> text8 kills neither, but I left it in case it's helpful for
> diagnosing the problem.)
> The versions of Markdown I'm running this through are version 1.0.1
> of the Perl script from daringfireball, and whatever's included in
> MarsEdit 2.1.3(1404).
> Any ideas?
Markdown 1.0.2b8 fixed this bug, as has Text::Markdown.
I'd recommend that you upgrade to one of these..
Various other implementations also get it right:
More information about the Markdown-Discuss