From b424adb93b7d4638e0c7222d1c9cfb60af635556 Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Tue, 13 Aug 2013 19:26:43 -0700 Subject: [PATCH] Forgot to make regex global --- builds/4chan-X.user.js | 2 +- builds/crx/script.js | 2 +- src/Linkification/Linkify.coffee | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 9916f84e2..bef0d95a8 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -4541,7 +4541,7 @@ } } while (/[)\]}>.,]/.test(char = text.charAt((len = text.length) - 1))) { - if (/[.,]/.test(char) || (text.match(/[()\[\]{}<>]/)).length % 2) { + if (/[.,]/.test(char) || (text.match(/[()\[\]{}<>]/g)).length % 2) { trim(); continue; } diff --git a/builds/crx/script.js b/builds/crx/script.js index 1b4513959..910049a46 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -4547,7 +4547,7 @@ } } while (/[)\]}>.,]/.test(char = text.charAt((len = text.length) - 1))) { - if (/[.,]/.test(char) || (text.match(/[()\[\]{}<>]/)).length % 2) { + if (/[.,]/.test(char) || (text.match(/[()\[\]{}<>]/g)).length % 2) { trim(); continue; } diff --git a/src/Linkification/Linkify.coffee b/src/Linkification/Linkify.coffee index ea7c3c902..a5fa64f5c 100644 --- a/src/Linkification/Linkify.coffee +++ b/src/Linkification/Linkify.coffee @@ -118,7 +118,7 @@ Linkify = # Clean hanging brackets, commas, periods while /[)\]}>.,]/.test char = text.charAt (len = text.length) - 1 - if /[.,]/.test(char) or (text.match /[()\[\]{}<>]/).length % 2 + if /[.,]/.test(char) or (text.match /[()\[\]{}<>]/g).length % 2 trim() continue break