On Tue, Nov 11, 2008 at 21:48, Frederick Cheung
<[EMAIL PROTECTED]>wrote:

>
> > I'd say: let's autolink everything that starts with "https?://" or
> > "www." up to the first whitespace or punctuation character before
> > the whitespace *if* that character isn't a closing parenthesis or
> > bracket that has a matching one on the beginning.
>
> I think it's certainly in the right direction.


Patched:
http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/1353-auto_link-helper-fails-to-parse-some-urls-with-brackets#ticket-1353-3

Previously hideous regexp becomes this: %r{( https?:// | www\. ) [^\s<]+}x

Added feature: intelligent closing bracket handling. You are now able to
write this:

  I've read an interesting article about
  sprites (link: http://en.wikipedia.org/wiki/Sprite_(computer_graphics))

All this in less code than before.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to