Skip to content
This repository was archived by the owner on May 24, 2021. It is now read-only.

Commit f8ddc70

Browse files
ThePsionicThePsionic
authored andcommitted
Added replace string to circumvent an...
...incredibly specific bug - fixes #22
1 parent f09a78d commit f8ddc70

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

wikilinker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ bot.on('message', (msg) => {
9292
}
9393

9494
if (/--([^\-|]+)(?:|[^-]+)?--/g.test(cleaned)) {
95-
const name = cleaned.replace(/.*?--([^\-|]+)(?:|[^-]+)?--/g, '$1\u200B');
95+
const name = cleaned.replace(/.*?--([^\-|]+)(?:|[^-]+)?--/g, '$1\u200B').replace(/.*(?:\n|\r)/g, '');
9696
const allLinks = name.split('\u200B').slice(0, -1);
9797
const unique = new Set(allLinks);
9898

0 commit comments

Comments
 (0)