Trouble with parentheses in Markdown hyperlinks
jgm at berkeley.edu
Thu Oct 18 12:38:33 EDT 2012
Pandoc, lunamark, peg-markdown, multimarkdown, and PHP markdown all handle
balanced parentheses in URLs -- probably others as well. I note that github's
markdown parser (sundown) and discount 22.214.171.124 fail to parse the balanced
parentheses in the first example. (Of course, since the spec is vague
on this issue, I can only say it's a failure relative to my own
interpretation of what markdown should do.)
+++ Fletcher Penney [Oct 17 12 21:00 ]:
> Markdown.pl (the original implementation by John Gruber) is basically abandonware at this point, as it as not been updated in years. In fact, as has been pointed out on this list, Gruber has not commented on this discussion group in years.
> That said, Markdown the *syntax*, is certainly alive and well in the form of multiple descendant projects.
> In fact, your example file below works just fine with MultiMarkdown, and presumably with peg-markdown (since I built MMD version 3 around John MacFarlane's peg-markdown implementation.)
> Not sure what implementation Stack Overflow is actually using, but clearly some implementations work just fine in this regard. Many (most?) modern implementations also have vastly improved performance over the original perl version for most documents (often by several orders of magnitude). If they are using Markdown.pl, perhaps it is time that they upgrade.... If not, simply speak with the developer of the actual implementation that is being used.
> On Oct 17, 2012, at 8:50 PM, Andrew Pennebaker wrote:
> > 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 Markdown document on Gist. All but the final hyperlink fail to be functional. You can verify this behavior in 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
> Fletcher T. Penney
> fletcher at fletcherpenney.net
> Markdown-Discuss mailing list
> Markdown-Discuss at six.pairlist.net
More information about the Markdown-Discuss