fix this https://rdrama.net/post/18459/marseycapywalking-megathread-for-bugs-and-suggestions/5751387#context
parent
17e25ebdfb
commit
0c08e5d7bb
|
@ -136,12 +136,8 @@ function update_inline_emoji_modal(event)
|
||||||
|
|
||||||
// Get current word at string, such as ":marse" or "word"
|
// Get current word at string, such as ":marse" or "word"
|
||||||
let coords = text.indexOf(' ',box_coords.pos);
|
let coords = text.indexOf(' ',box_coords.pos);
|
||||||
current_word = /(^|\s):[!#a-zA-Z0-9_]+(?=\n|$)/.exec(text.slice(0, coords === -1 ? text.length : coords));
|
current_word = /(^|\s)(:[!#a-zA-Z0-9_]+(?=\n|$))/.exec(text.slice(0, coords === -1 ? text.length : coords));
|
||||||
if (current_word) {
|
if (current_word) current_word = current_word[2].toLowerCase();
|
||||||
current_word = current_word[0].toLowerCase();
|
|
||||||
if (current_word.startsWith(' :'))
|
|
||||||
current_word = current_word.substring(1)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* We could also check emoji_typing_state here, which is less accurate but more efficient. I've
|
/* We could also check emoji_typing_state here, which is less accurate but more efficient. I've
|
||||||
* kept it unless someone wants to provide an option to toggle it for performance */
|
* kept it unless someone wants to provide an option to toggle it for performance */
|
||||||
|
|
Loading…
Reference in New Issue