I'll try to expand the example to test everything at some point. Here's a probably-reliable source: http://en.wikipedia.org/wiki/E-mail_address#Local_part
Well, recognizing "free" URIs, including emails (with mailto: prefix as with URI standard) can be problematic. Better is to use links, [[]] explicitly, but maybe you are here.
The issue with more expansive matching of emails and URIs without special syntax is the regular expressions can have a lot of "backtracking" and it makes parsing certain patterns really, really slow.
Main thing here is that we should conform to the spec for email addresses, and for sure it needs to be right for external links.
If they should be recognized, let's add tests for each case.
Gerry's right, though just adding numbers, underscores, and periods may be worth it. In the meantime this works.
I was not using [[]] but imho if we're going to recognize free URIs we should at least do a half-decent job of it :-)
I'd throw dashes - and plusses, common w GMail addresses - into any quick fix.
Any thoughts on when this will work?
Also, partial workaround - for GMail addresses at least - is that their dots are apparently optional.
dunno. not a priority for me.
Anyone want to point me to the file? It's just a regex, right?
It's a long way from just-a-regex. https://github.com/wagn/wagn/blob/master/pack/core/chunks/uri.rb
Any changes would need automated tests and code review for the performance problems Gerry described.
An easier fix that would be nice would be if the "mailto:" got dropped from double-bracketed email links:
[[mailto:john.abbe@gmail.com]]:
mailto:john.abbe@gmail.com
The issue for me is that I'm working on pages that I want newbies to be able to edit, so the less markup, the better.
Still a significant annoyance, I run into email addresses where the part before the @ ends with a number all the time and you end up with a clickable link that goes to the domain :-P. Trying to explain workarounds for that to Wagn newbies is not something I look forward to.
Tried this other workaround - editing the HTML to make it an explicit mailto link - but Wagn sticks the web link on top of the domain part of the address: sample5@domain.com">sample1@domain.com
ok something even weirder is happening there than when I tried it on another site - giving up for now.
May help:
http://daringfireball.net/2010/07/improved_regex_for_matching_urls