From 0b678949e18957d204d4e083dffe69b3f08e2ceb Mon Sep 17 00:00:00 2001 From: ixv Date: Wed, 1 Dec 2021 15:48:41 -0800 Subject: [PATCH] interface: fix publish url preprocessing --- pkg/interface/src/logic/lib/tokenizeMessage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/interface/src/logic/lib/tokenizeMessage.js b/pkg/interface/src/logic/lib/tokenizeMessage.js index 84c25492ea..86a5913d9b 100644 --- a/pkg/interface/src/logic/lib/tokenizeMessage.js +++ b/pkg/interface/src/logic/lib/tokenizeMessage.js @@ -19,7 +19,7 @@ export const isUrl = (str) => { const raceRegexes = (str) => { let link = str.match(URL_REGEX); - while(link?.[1]?.endsWith('(')) { + while(link?.[1]?.endsWith('(') || link?.[1].endsWith('[')) { const resumePos = link[1].length + link[2].length; const resume = str.slice(resumePos); link = resume.match(URL_REGEX);