showdownjs / showdown

A bidirectional Markdown to HTML to Markdown converter written in Javascript
http://www.showdownjs.com/
MIT License
14.1k stars 1.57k forks source link

Incorrect parsing of inline link #1006

Open romainjudic opened 3 months ago

romainjudic commented 3 months ago

Description: Inline link is detected even when there is a space between square brackets and parentheses.

The pattern for inline links is [link text](link): the left square bracket and the left parentheses are next to each other, without white space between them.

It turns out that adding a white space in between still results in an inline link, but it should not.

Input:

[some] (text)

Expected output:

<p>[some] (text)</p>

Actual output:

<p><a href="text">some</a></p>