Ignore case in emoji replacement
The capital letters from the user input could still be there since current_word is lowercasepull/162/head
parent
2cd167b9fa
commit
98a2ade30b
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue