Problem with links in Markdown

Alexander Veit lbloom at
Sun Jun 23 15:36:54 EDT 2013

Michel Fortin wrote:

> -----Original Message-----

> From: markdown-discuss-bounces at [mailto:markdown-

> discuss-bounces at] On Behalf Of Michel Fortin

> Sent: Thursday, June 20, 2013 10:17 PM

> To: Discussion related to Markdown.

> Subject: Re: Problem with links in Markdown


> Le 20-juin-2013 à 14:48, Alexander Veit <lbloom at> a écrit :


> > The book of [Life](

> "Life textbook").

> >

> > which is converted to

> >

> > <p>The book of <a

> href="">Life</a> "Life

> textbook").</p>


> Most Markdown implementations out there do the right thing: matching

> opening and closing parenthesis. It's just sad that

> doesn't.


> ife%5D(

> textbook%22).%0A

OK, but matching opening and closing parens is nothing more than the attempt to make an educated guess. Even though the approach reduces the number of failures, it does not make a correct algorithm for parsing arbitrary links.

> [...]


> Angle brackets surrounding the URL are supported by most Markdown

> parsers, but the URL must be kept inside the parens.

OK, agreed. Even though additional parens are required, it seems to me that this is in better accordance with the reference-style link syntax.

> Unfortunately, only some parsers correctly use them

> to disambiguate:



Imho, these are bugs:

showdown 0.3.1 1.0.1
RDiscount 1.6.8
marked 0.2.6
RedCarpet 2.1.1:
Opening angle-bracket ignored, rendered as a link. 1.0.2b8:
Invalid URI syntax in generated link.

peg-markdown 0.4.14
Maruku 0.6.1
Maruku (Math-Enabled) 0.7.1.beta1:
Non-URI character HTML-escaped, wrong link generated.

Just my two cents

More information about the Markdown-Discuss mailing list