tags 625837 + wontfix thanks On Fri, May 06, 2011 at 06:56:14PM +0200, Michael Below wrote: > Am Fr 06 Mai 2011 18:21:40 CEST > schrieb Alessandro Ghedini <[email protected]>: > > > Now I see what you want: » and « being interpreted by discount as > > quotes (just like ' and "), am I right? This may be a whishlist > > feature to forward upstream. > > Yes, probably... > > I want to use markdown for blog comments, so it should create valid > output even if the input may be misleading. Probably discount was not > made for this. > > > That is understendable. mailto: is a valid URI scheme, hence it is > > converted into an HTML anchor. discount seems to interpret '-links' > > as an email address, but that's normal since it doesn't do any check > > on the URLs (maybe another whishlist feature? Not sure if this would > > be accpted though). > > Yes, seems to be difficult. It looks like the markdown > implementation used for github comments (Redcarpet, which is a > Ruby wrapper for Upskirt) ignores mailto:, but for http: it does the > right thing: > > ruby-1.9.2-head :010 > markdown = Redcarpet.new("some http:-links work > better than others http://example.org", :autolink) > => #<Redcarpet:0x00000002811580 @text="some http:-links work better > than others http://example.org", @autolink=true> > ruby-1.9.2-head :011 > puts markdown.to_html > <p>some http:-links work better than others <a > href="http://example.org">http://example.org</a></p> > => nil
I think I've understood what's happening. http: and mailto: URIs are different, because the http: needs double slashes (like in http://a.org) while mailto: doesn't (like in mailto:[email protected]), hence discount parses the document in search of <uri>: like tokens to catch both. Given that upskirt does not support mailto: it can simply search for <uri>:// which may be the reason why it doesn't fail with "http:-like". If I am right, it should do the same with the string "http://-links" instead. That's just how discount works and I'm afraid it can't be fixed without rewriting big parts of it (or loosing the mailto autolink feature). If you don't need autolinking on mailto URLs probably upskirt makes more sense for your project. I'm tagging the bug as wontfix. Cheers -- perl -E'$_=q;$/= @{[@_]};and s;\S+;<inidehG ordnasselA>;eg;say~~reverse' -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

