Bug: invalid nesting of inline markup across link labels

John Gruber gruber at fedora.net
Wed May 3 20:11:28 EDT 2006

A. Pagaltzis <pagaltzis at gmx.de> wrote on 5/2/06 at 9:15 PM:

> there’s a bug in Markdown.pl:


> [foo*bar](#) [baz*quux](#)


> This expands to the following:


> <p><a href="#">foo<em>bar</a> <a href="#">baz</em>quux</a></p>


> Those `*` should either be disregarded or the tags should nest

> correctly:


> 1. <p><a href="#">foo*bar</a> <a href="#">baz*quux</a></p>

> 2. <p><a href="#">foo<em>bar</em></a><em> </em><a href="#"><em>baz</em>quux</a></p>


> Of course, the second option is a lot more complex to implement

> and at the same time unlikely to be what the user actually meant.

Good catch.

I think the first solution is better.


More information about the Markdown-Discuss mailing list