improve speed_emoji_modal

pull/78/head
Aevann1 2022-12-16 21:14:24 +02:00
parent e5aa3c3e92
commit da4c15d0af
1 changed files with 1 additions and 1 deletions

View File

@ -492,7 +492,7 @@ function update_speed_emoji_modal(event)
// Get current word at string, such as ":marse" or "word"
let coords = text.indexOf(' ',box_coords.pos);
current_word = /\S+$/.exec(text.slice(0, coords === -1 ? text.length : coords));
current_word = /:[!#a-zA-Z0-9_]+(?=\s|$)/.exec(text.slice(0, coords === -1 ? text.length : coords));
if (current_word) current_word = current_word.toString();
/* We could also check emoji_typing_state here, which is less accurate but more efficient. I've