Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

url with no www #49

Closed
wants to merge 1 commit into from

2 participants

Anton Juanjo Bazán
Anton

No description provided.

Juanjo Bazán
Collaborator

This change does not fix any problem and breaks the test suite. Closing.

Juanjo Bazán xuanxu closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 22, 2014
  1. Anton

    url with no www

    ipatovanton authored
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 4 deletions.
  1. +1 −4 lib/rails_autolink/helpers.rb
5 lib/rails_autolink/helpers.rb
View
@@ -70,10 +70,7 @@ def auto_link(text, *args, &block) #link = :all, html = {}, &block)
private
- AUTO_LINK_RE = %r{
- (?: ((?:ed2k|ftp|http|https|irc|mailto|news|gopher|nntp|telnet|webcal|xmpp|callto|feed|svn|urn|aim|rsync|tag|ssh|sftp|rtsp|afs|file):)// | www\. )
- [^\s<\u00A0"]+
- }ix
+ AUTO_LINK_RE = /\(?(?:(ed2k|ftp|http|https|irc|mailto|news|gopher|nntp|telnet|webcal|xmpp|callto|feed|svn|urn|aim|rsync|tag|ssh|sftp|rtsp|afs|file):\/\/)?(?:((?:[^\W\s]|\.|-|[:]{1})+)@{1})?((?:www.)?(?:[^\W\s]|\.|-)+[\.][^\W\s]{2,4}|localhost(?=\/)|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})(?::(\d*))?([\/]?[^\s\?]*[\/]{1})*(?:\/?([^\s\n\?\[\]\{\}\#]*(?:(?=\.)){1}|[^\s\n\?\[\]\{\}\.\#]*)?([\.]{1}[^\s\?\#]*)?)?(?:\?{1}([^\s\n\#\[\]]*))?([\#][^\s\n]*)?\)?/
# regexps for determining context, used high-volume
AUTO_LINK_CRE = [/<[^>]+$/, /^[^>]*>/, /<a\b.*?>/i, /<\/a>/i]
Something went wrong with that request. Please try again.