From 64944b513249359929520387bab6c9e3a9ee0177 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sat, 3 Oct 2015 14:37:29 -0700 Subject: [PATCH] Don't break links at apostrophes. #485 --- src/Linkification/Linkify.coffee | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Linkification/Linkify.coffee b/src/Linkification/Linkify.coffee index 0bfbfb2ce..6851738f2 100755 --- a/src/Linkification/Linkify.coffee +++ b/src/Linkification/Linkify.coffee @@ -27,8 +27,8 @@ Linkify = Linkify.process @nodes.comment process: (node) -> - test = /[^\s'"]+/g - space = /[\s'"]/ + test = /[^\s"]+/g + space = /[\s"]/ snapshot = $.X './/br|.//text()', node i = 0 links = [] @@ -80,7 +80,7 @@ Linkify = | # This should account for virtually all links posted without http: ([-a-z\d]+[.])+( aero|asia|biz|cat|com|coop|dance|info|int|jobs|mobi|moe|museum|name|net|org|post|pro|tel|travel|xxx|xyz|edu|gov|mil|[a-z]{2} - )([:/]|(?![^\s'"])) + )([:/]|(?![^\s"])) | # IPv4 Addresses [\d]{1,3}\.[\d]{1,3}\.[\d]{1,3}\.[\d]{1,3} | # E-mails