FIX: do not show emoji menu when : has a letter before

This commit is contained in:
Joffrey JAFFEUX 2018-03-14 10:28:57 +01:00 committed by GitHub
parent c5fa452f00
commit d2a7a4916a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -357,7 +357,11 @@ export default Ember.Component.extend({
},
onKeyUp(text, cp) {
return text.substring(0, cp).match(/(:(?!:).?[\w-]*:?(?!:)(?:t\d?)?:?) ?$/g);
const matches = /(?:^|[^a-z])(:(?!:).?[\w-]*:?(?!:)(?:t\d?)?:?) ?$/gi.exec(text.substring(0, cp));
if (matches && matches[1]) {
return [ matches[1] ];
}
},
transformComplete(v) {