Forgot to make regex global

This commit is contained in:
Zixaphir 2013-08-13 19:26:43 -07:00
parent fb8a856fba
commit b424adb93b
3 changed files with 3 additions and 3 deletions

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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