FIX: emoji autocomplete triggering incorrectly

Previous to this fix the we were checking for non letters.

This was mismatching what pretty-text/addon/emoji.js was doing.

`ù:su`

and

`1:su`

Would lead to an emoji autocomplete popup in the composer.
This commit is contained in:
Sam Saffron 2020-06-09 17:22:51 +10:00
parent 8b434531e4
commit 08044b4f94
No known key found for this signature in database
GPG Key ID: B9606168D2FFD9F5
1 changed files with 1 additions and 1 deletions

View File

@ -436,7 +436,7 @@ export default Component.extend({
return false; return false;
} }
const matches = /(?:^|[^a-z])(:(?!:).?[\w-]*:?(?!:)(?:t\d?)?:?) ?$/gi.exec( const matches = /(?:^|[>.,\/#!$%^&*;:{}=\-_`~()])(:(?!:).?[\w-]*:?(?!:)(?:t\d?)?:?) ?$/gi.exec(
text.substring(0, cp) text.substring(0, cp)
); );