tristanjuricek / knockoff

A Markdown parser + object model in scala
http://tristanjuricek.github.com/knockoff
BSD 3-Clause "New" or "Revised" License
102 stars 17 forks source link

Markdown compatibility: Bad link translation with parenthetical text #22

Closed bmc closed 14 years ago

bmc commented 14 years ago

Consider this Markdown text:

Here is a [link][] (cool!)

[link]: http://localhost/

With that input, John Gruber's Perl markdown script produces:

<p>Here is a <a href="http://localhost/">link</a> (Cool!).</p>

Knockoff produces:

<p>Here is a [link]<a href="Cool!" ></a>.
</p>

Remove the trailing parenthetical expression, and Knockoff produces a valid link:

Input

Here is a [link][].

[link]: http://localhost/

Output

<p>Here is a <a href="http://localhost/" >link</a>.
</p>

Error discovered in: knockoff_2.8.0.RC2-0.7.1-11.jar

tristanjuricek commented 14 years ago

Should be fixed in 0.7.1-12. Thank you very much for the reproduction example.