Feature #10408
Support More Hyperlink Protocols in the Wiki Formatter (textile/formatter.rb)
Status: | New | Start date: | ||
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 0% | |
Category: | - | |||
Target version: | - | |||
Resolution: |
Description
The wiki formatter, while awesome, only supports a few protocols for the auto linking (AUTO_LINK_RE).
So, I made this little hack to get it to support almost anything
This in-line patch is against 1.3.0 and hasn't crashed mine (yet!) :0
--- formatter.rb.orig 2012-03-08 10:03:52.000000000 -0800 +++ formatter.rb 2012-03-08 10:04:06.000000000 -0800 @@ -132,9 +132,8 @@ ^ # beginning of line ) ( - (?:https?://)| # protocol spec, or - (?:s?ftps?://)| (?:www\.) # www.* + (?:\w{3,6}://) # Almost anything ssh, vnc, http, https, mailto, ics, tel, sip, foo, beer, monkey ) ( (\S+?) # url
Thanks for awesome software!