#998631 discount incorrectly parses URIs with trailing parentheses

Package:
discount
Source:
discount
Description:
implementation of the Markdown markup language in C
Submitter:
Jonathan Dowland
Date:
2021-11-05 10:30:04 UTC
Severity:
normal
Tags:
#998631#5
Date:
2021-11-05 09:41:22 UTC
From:
To:
See e.g.

  $ markdown
  [some link with parens in it](http://foo.com/parens(yeah))
  <p><a href="http://foo.com/parens(yeah">some link with parens in it</a>)</p>

The URI's closing parenthesis has been incorrectly moved outside of the
hyperlink, resulting in broken link and messy text.

The following markdown implementations get this right:

 * libtext-markdown-perl 1.000031 (debian -3)
 * multimarkdown 1.000035 (debian -2)

Correct output is

  $ markdown
  [some link with parens in it](http://foo.com/parens(yeah))
  <p><a href="http://foo.com/parens(yeah)">some link with parens in it</a></p>

#998631#10
Date:
2021-11-05 09:48:01 UTC
From:
To:
I've discovered that upstream consider this to be correct to the
markdown specification, which is to say, apprarently Gruber's original
code suffers the same bug: https://github.com/Orc/discount/issues/241