FIX: Don't show emoji selector when ending a line with a colon

This commit is contained in:
Robin Ward 2017-06-13 14:25:09 -04:00
parent 299339a373
commit 74858fd450
2 changed files with 2 additions and 3 deletions

View File

@ -338,8 +338,7 @@ export default Ember.Component.extend({
},
onKeyUp(text, cp) {
const subtext = text.substring(0, cp);
return subtext.match(/(:(?!:).?[\w-]*:?(?!:)(?:t\d?)?:?) ?$/gm);
return text.substring(0, cp).match(/(:(?!:).?[\w-]*:?(?!:)(?:t\d?)?:?) ?$/g);
},
transformComplete(v) {

View File

@ -363,7 +363,7 @@ export default function(options) {
if (options.key) {
if (options.onKeyUp && key !== options.key) {
var match = options.onKeyUp(me.val(), cp);
let match = options.onKeyUp(me.val(), cp);
if (match) {
completeStart = cp - match[0].length;
completeEnd = completeStart + match[0].length - 1;