vmg / sundown

Standards compliant, fast, secure markdown processing library in C
1.99k stars 385 forks source link

xmpp: URL #59

Open nono opened 13 years ago

nono commented 13 years ago

Hi,

I'm using Redcarpet 1.17.2 with :autolink and I have some problems with xmpp: URL. Ideally, xmpp: links could be automatically detected by the autolink feature, but for the moment, I'd like to enter these URL as simple links. It doesn't work because they are transformed to mailto: URL by the autolink:

Redcarpet.new("xmpp:bar@example.com", :autolink).to_html
=> "<p>xmpp:<a href=\"mailto:bar@example.com\">bar@example.com</a></p>\n"
Redcarpet.new("[xmpp:bar@example.com](xmpp:bar@example.com)", :autolink).to_html
=> "<p><a href=\"xmpp:bar@example.com\">xmpp:<a href=\"mailto:bar@example.com\">bar@example.com</a></a></p>\n"

Do you think, you can do something for this case?

vmg commented 13 years ago

Yes, this is certainly an interesting corner case. I'll try to handle it more gracefully.

gregleaver commented 12 years ago

Just an update, the second case seems to be fixed by 9dfeea9d.