From 3f04351e488cc0bfd2e141eb822e4cd526f0678b Mon Sep 17 00:00:00 2001 From: Mayhem Date: Tue, 20 Aug 2013 17:19:04 +0200 Subject: [PATCH] Mention Gruber's regexp in the LICENSE. --- LICENSE | 3 +++ src/Linkification/Linkify.coffee | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 6743356de..9329b9c22 100644 --- a/LICENSE +++ b/LICENSE @@ -34,5 +34,8 @@ audio/beep.wav from http://freesound.org/people/pierrecartoons1979/sounds/90112/ Font Awesome by Dave Gandy (http://fontawesome.io) license: http://fontawesome.io/license/ +URL-matching regular expression by John Gruber (http://df4.us/fv9) + "Consider it public domain." + seaweedchan/4chan-x (https://github.com/seaweedchan/4chan-x) license: https://github.com/seaweedchan/4chan-x/blob/master/LICENSE diff --git a/src/Linkification/Linkify.coffee b/src/Linkification/Linkify.coffee index 99f667fbe..5136cdfce 100644 --- a/src/Linkification/Linkify.coffee +++ b/src/Linkification/Linkify.coffee @@ -3,7 +3,7 @@ Linkify = return if g.VIEW is 'catalog' or !Conf['Linkify'] # gruber revised + magnet support - # http://rodneyrehm.de/t/url-regex.html + # http://df4.us/fv9 @catchAll = /\b([a-z][\w-]+:(\/{1,3}|[a-z0-9%]|\?(dn|x[lts]|as|kt|mt|tr)=)|www\d{0,3}\.|[a-z0-9.\-]+\.[a-z]{2,4}\/)([^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’])/g Post::callbacks.push