mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 21:23:45 +08:00
FIX: do not show emoji menu when :
has a letter before
This commit is contained in:
parent
c5fa452f00
commit
d2a7a4916a
|
@ -357,7 +357,11 @@ export default Ember.Component.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
onKeyUp(text, cp) {
|
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) {
|
transformComplete(v) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user