From a6f8872baa3f60ea6ccdc79ccf206bed88db35d1 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Thu, 26 Oct 2023 20:07:01 -0400 Subject: [PATCH] fix: Selecting flag inserts a different flag closes #6079 --- shared/editor/lib/emoji.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/editor/lib/emoji.ts b/shared/editor/lib/emoji.ts index 3dc0addb9..acdfca291 100644 --- a/shared/editor/lib/emoji.ts +++ b/shared/editor/lib/emoji.ts @@ -11,7 +11,7 @@ export const emojiMartToGemoji = { * @param str The string to convert * @returns The converted string */ -export const snakeCase = (str: string) => str.replace(/(\w)(-)(\w)/g, "$1_$2"); +export const snakeCase = (str: string) => str.replace(/(\w)-(\w)/g, "$1_$2"); /** * A map of emoji shortcode to emoji character. The shortcode is snake cased