Trouble with parentheses in Markdown hyperlinks

Andrew Pennebaker andrew.pennebaker at gmail.com
Wed Oct 17 20:50:01 EDT 2012


How can we improve URL detection in Markdown? I posted a question on Stack
Overflow and happened to click a URL in my post. To my surprise, it wasn't
functional, and it took three different, nonintuitive manipulations before
I achieved a functional URL. Stack Overflow says "not my problem", so I'm
deferring to Markdown itself.

Here's a sample<https://raw.github.com/gist/3909246/1885a4d509fb555c158208d9bfc319b9f8f95039/urls.md>Markdown
document on Gist. All but the final hyperlink fail to be
functional. You can verify this behavior in
Dingus<http://daringfireball.net/projects/markdown/dingus>. I'd
paste my sample directly in Gmail, but it would actually fix the URLs and
obscure the problem.

I believe this is easily fixed by altering the regex responsible for
parsing [name](url) syntax to be lazy rather than eager.

--
Cheers,

Andrew Pennebaker
www.yellosoft.us
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://six.pairlist.net/pipermail/markdown-discuss/attachments/20121017/0b32edff/attachment.htm>


More information about the Markdown-Discuss mailing list