From afb1d850a386d47b5ebc6dc58a5115b1db0b62a5 Mon Sep 17 00:00:00 2001 From: Getabalew Tesfaye Date: Mon, 1 May 2023 16:25:45 +0300 Subject: [PATCH] Revert "remove unnecessary character from regex" This reverts commit 31e2b557a7f6038ba3e9ef8007a76a1b7cd8d4b2. --- lib/ExpensiMark.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ExpensiMark.js b/lib/ExpensiMark.js index 24b0e2ed..c66c4a30 100644 --- a/lib/ExpensiMark.js +++ b/lib/ExpensiMark.js @@ -71,7 +71,8 @@ export default class ExpensiMark { name: 'userMentions', regex: /((`||
)\s*?)?[`.]?@+[\w+]*@+\w*[.]+\w*/gm,
                 replacement: (match) => {
-                    const isMatchValid = !(match.startsWith('.') || /(|
|`)/g.test(match));
+                    const isMatchValid = !(match.startsWith('.') || /(|
|`| )/g.test(match));
+
                     if (match.endsWith('_') && isMatchValid) {
                         const mention = match.substring(0, match.length - 1);
                         return `${mention}_`;