Ignore case in emoji replacement

The capital letters from the user input could still be there since
current_word is lowercase
pull/162/head
KindaCrayCray 2023-06-30 04:41:58 +02:00
parent 2cd167b9fa
commit 98a2ade30b
1 changed files with 1 additions and 1 deletions

View File

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