A. Pagaltzis
2006-May-02 15:15 UTC
Bug: invalid nesting of inline markup across link labels
Hi John,
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.
Regards,
--
Aristotle Pagaltzis // <http://plasmasturm.org/>
Waylan Limberg
2006-May-02 15:26 UTC
Bug: invalid nesting of inline markup across link labels
For comparison, Python-Markdown[1] results in this:
<p> <a href="#">foo*bar</a> <a
href="#">baz*quux</a>
</p>
[1]: http://www.freewisdom.org/projects/python-markdown/
On 5/2/06, A. Pagaltzis <pagaltzis@gmx.de> wrote:> Hi John,
>
> 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.
>
> Regards,
> --
> Aristotle Pagaltzis // <http://plasmasturm.org/>
> _______________________________________________
> Markdown-Discuss mailing list
> Markdown-Discuss@six.pairlist.net
> http://six.pairlist.net/mailman/listinfo/markdown-discuss
>
--
----
Waylan Limberg
waylan@gmail.com
John Gruber
2006-May-03 20:11 UTC
Bug: invalid nesting of inline markup across link labels
A. Pagaltzis <pagaltzis@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. -J.G.