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>
Le 2012-10-17 ? 20:50, Andrew Pennebaker <andrew.pennebaker at gmail.com> a ?crit :> 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.It's not so simple (it can break other [links](http://michelf.ca)). PHP Markdown solves this by attempting to match opening and closing parenthesis in the URL (which works except for some extreme cases like <http://en.wikipedia.org/wiki/(>). Also, you can wrap your URL in <>: [links](<http://michelf.ca>), but I'm not sure it'll work that well in all implementations. -- Michel Fortin michel.fortin at michelf.ca http://michelf.ca/
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. Fletcher 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 -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4899 bytes Desc: not available Url : <http://six.pairlist.net/pipermail/markdown-discuss/attachments/20121017/ded9687f/attachment.bin>
This is really part of a larger issue, which is developing a "standards-body" for the community of developers of projects built around the Markdown syntax, now that the core program, i.e. Markdown.pl is no longer maintained. This has been discussed multiple times on this list by myself and several others, and has generally not gained any traction. I wish you luck in your quest. F- On Oct 18, 2012, at 1:38 PM, Andrew Pennebaker wrote:> Could we standardize URL-parsing regexes across Markdown implementations? Can we come up with a really super regex and invite the various fork developers and maintainers to use that regex? > > -- > Cheers, > > Andrew Pennebaker > www.yellosoft.us > _______________________________________________ > Markdown-Discuss mailing list > Markdown-Discuss at six.pairlist.net > http://six.pairlist.net/mailman/listinfo/markdown-discuss-- Fletcher T. Penney fletcher at fletcherpenney.net -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4899 bytes Desc: not available Url : <http://six.pairlist.net/pipermail/markdown-discuss/attachments/20121018/dbd4ce54/attachment.bin>
Alan Hogan
2012-Oct-24 20:19 UTC
How to insert a blank line between blockquote paragraphs?
Folks, my apologies. Those links seem to break after running through the listserv. Below, I use my URL shortener to give you un-breakable links. My original suggestion to Thomas: http://ajh.us/bmd1 The actual link to the funny lunamark behavior: http://ajh.us/bmd2 Alan -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4887 bytes Desc: not available Url : <http://six.pairlist.net/pipermail/markdown-discuss/attachments/20121024/fc40b762/attachment.bin>