Trouble with parentheses in Markdown hyperlinks
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
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Markdown-Discuss