fix: Selecting flag inserts a different flag

closes #6079
This commit is contained in:
Tom Moor
2023-10-26 20:07:01 -04:00
parent fb56b00e81
commit a6f8872baa

View File

@@ -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