Forgot to make regex global
This commit is contained in:
parent
fb8a856fba
commit
b424adb93b
@ -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;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user