From b64294af6db48a1b2512f17522f989e4ccadfc42 Mon Sep 17 00:00:00 2001 From: Bettenbuk Zoltan Date: Wed, 27 Nov 2019 10:59:23 +0100 Subject: [PATCH] fix: emoji in links --- react/features/chat/functions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react/features/chat/functions.js b/react/features/chat/functions.js index c28e85f7a..e45588301 100644 --- a/react/features/chat/functions.js +++ b/react/features/chat/functions.js @@ -32,7 +32,7 @@ const EMOTICON_REGEXP_ARRAY: Array> = []; // Adding slack-type emoji format escapedValues.push(escapeRegexp(`:${key}:`)); - const regexp = `(${escapedValues.join('|')})`; + const regexp = `\\B(${escapedValues.join('|')})\\B`; EMOTICON_REGEXP_ARRAY.push([ new RegExp(regexp, 'g'), value ]); }