From 98a2ade30b895b673f03e082b912553eebd7c5aa Mon Sep 17 00:00:00 2001 From: KindaCrayCray Date: Fri, 30 Jun 2023 04:41:58 +0200 Subject: [PATCH] Ignore case in emoji replacement The capital letters from the user input could still be there since current_word is lowercase --- files/assets/js/emoji_modal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/assets/js/emoji_modal.js b/files/assets/js/emoji_modal.js index 0ce417074..3961eaf3c 100644 --- a/files/assets/js/emoji_modal.js +++ b/files/assets/js/emoji_modal.js @@ -408,7 +408,7 @@ function populate_speed_emoji_modal(results, textbox) emoji_option.addEventListener('click', () => { selecting = false; speed_carot_modal.style.display = "none"; - textbox.value = textbox.value.replace(new RegExp(current_word+"(?=\\s|$)", "g"), `:${name}: `) + textbox.value = textbox.value.replace(new RegExp(current_word+"(?=\\s|$)", "gi"), `:${name}: `) textbox.focus() if (document.location.pathname != '/chat'){ markdown(textbox)