diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 42d8b6f90..607c84afc 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -4481,7 +4481,7 @@ if (Linkify.regString.exec(word)) { links.push(Linkify.makeRange(node, endNode, index, length)); } - if (!(test.lastIndex || node === endNode)) { + if (!(test.lastIndex && node === endNode)) { break; } } diff --git a/builds/crx/script.js b/builds/crx/script.js index 0827b942c..b24cc2453 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -4490,7 +4490,7 @@ if (Linkify.regString.exec(word)) { links.push(Linkify.makeRange(node, endNode, index, length)); } - if (!(test.lastIndex || node === endNode)) { + if (!(test.lastIndex && node === endNode)) { break; } } diff --git a/src/Linkification/Linkify.coffee b/src/Linkification/Linkify.coffee index fe83936ad..d0f1488ae 100755 --- a/src/Linkification/Linkify.coffee +++ b/src/Linkification/Linkify.coffee @@ -78,7 +78,7 @@ Linkify = if Linkify.regString.exec word links.push Linkify.makeRange node, endNode, index, length - break unless test.lastIndex or node is endNode + break unless test.lastIndex and node is endNode for link in links.reverse() @nodes.links.push Linkify.makeLink link, @