Commit 88114c41 authored by Mike Greiling's avatar Mike Greiling

export validEmojiNames for autocomplete

parent 527e7edb
...@@ -55,4 +55,5 @@ export { ...@@ -55,4 +55,5 @@ export {
getUnicodeSupportMap, getUnicodeSupportMap,
isEmojiNameValid, isEmojiNameValid,
isEmojiUnicodeSupported, isEmojiUnicodeSupported,
validEmojiNames,
}; };
import { glEmojiTag } from './behaviors/gl_emoji'; import { glEmojiTag } from './behaviors/gl_emoji';
import { emojiMap, emojiAliases } from './emoji'; import { validEmojiNames } from './emoji';
import glRegexp from './lib/utils/regexp'; import glRegexp from './lib/utils/regexp';
import AjaxCache from './lib/utils/ajax_cache'; import AjaxCache from './lib/utils/ajax_cache';
...@@ -374,7 +374,7 @@ class GfmAutoComplete { ...@@ -374,7 +374,7 @@ class GfmAutoComplete {
if (this.cachedData[at]) { if (this.cachedData[at]) {
this.loadData($input, at, this.cachedData[at]); this.loadData($input, at, this.cachedData[at]);
} else if (GfmAutoComplete.atTypeMap[at] === 'emojis') { } else if (GfmAutoComplete.atTypeMap[at] === 'emojis') {
this.loadData($input, at, Object.keys(emojiMap).concat(Object.keys(emojiAliases))); this.loadData($input, at, validEmojiNames);
} else { } else {
AjaxCache.retrieve(this.dataSources[GfmAutoComplete.atTypeMap[at]], true) AjaxCache.retrieve(this.dataSources[GfmAutoComplete.atTypeMap[at]], true)
.then((data) => { .then((data) => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment