alminium / redmine_redcarpet_formatter

Another Markdown Wiki Formatter for Redmine based on Redcarpet markdown processor.
GNU General Public License v2.0
135 stars 38 forks source link

Links with closed parens boken #20

Closed danomatika closed 11 years ago

danomatika commented 11 years ago

Using a link like this:

http://en.wikipedia.org/wiki/Nightfall_(Asimov_short_story)

in a markdown link like:

[Nightfall](http://en.wikipedia.org/wiki/Nightfall_(Asimov_short_story))

is not rendered correctly as the first close parens is used to close the link, instead of the second parens. The rendered link is:

http://en.wikipedia.org/wiki/Nightfall_(Asimov_short_story

which is broken. I think the parser needs to use a stack to remember if a closed parens was found in the link it self ...

mikoto20000 commented 11 years ago

redcarpet formatter uses redcarpet is used in GitHub markdown. Unfortunately, your report is same as GitHub's markdown.

Could you report to redcarpet repository https://github.com/vmg/redcarpet ?

danomatika commented 11 years ago

Apparently it's up the the user to escape the parens in this case as per the Markdown spec: https://github.com/vmg/redcarpet/issues/45

:P Too bad. Escaping the parens with a backslash works. Like this:

[Nightfall](http://en.wikipedia.org/wiki/Nightfall_\(Asimov_short_story\))