From 7d61ff2dcfe63d24e4d14a8b7e9fbc4f69ff8aaa Mon Sep 17 00:00:00 2001 From: densellp Date: Mon, 30 Oct 2023 11:22:01 -0700 Subject: [PATCH] fix: added check for whitespace before x[num] --- service/recognition.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/recognition.js b/service/recognition.js index bb1ce18d..c58df572 100644 --- a/service/recognition.js +++ b/service/recognition.js @@ -20,7 +20,7 @@ const tagRegex = /#(\S+)/g; const generalEmojiRegex = /:([a-z-_']+):/g; const gratitudeEmojiRegex = new RegExp(config.recognizeEmoji, "g"); const multiplierRegex = new RegExp( - `${config.recognizeEmoji}\\sx([0-9]+)|x([0-9]+)\\s${config.recognizeEmoji}` + `${config.recognizeEmoji}\\s*x([0-9]+)|x([0-9]+)\\s${config.recognizeEmoji}` ); // TODO Can we add a 'count' field to the recognition?