From 1a5fb5fa51a7d019c2f73ccf11e4d25941461ada Mon Sep 17 00:00:00 2001 From: jessopb <36554050+jessopb@users.noreply.github.com> Date: Wed, 27 Oct 2021 21:21:40 -0400 Subject: [PATCH] improve channel mentions (#146) something like @; was crashing the app. this should be better. --- ui/util/remark-lbry.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/util/remark-lbry.js b/ui/util/remark-lbry.js index 974c9a61d..d478751cd 100644 --- a/ui/util/remark-lbry.js +++ b/ui/util/remark-lbry.js @@ -7,9 +7,9 @@ export const punctuationMarks = [',', '.', '!', '?', ':', ';', '-', ']', ')', '} const mentionToken = '@'; // const mentionTokenCode = 64; // @ -const mentionRegex = /@[^\s()"]*/gm; const invalidRegex = /[-_.+=?!@#$%^&*:;,{}<>\w/\\]/; +const mentionRegex = /@[^\s()"-_.+=?!@$%^&*;,{}<>/\\]*/gm; function handlePunctuation(value) { const protocolIndex = value.indexOf('lbry://') === 0 ? protocol.length - 1 : 0;