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

export validEmojiNames for autocomplete

parent 527e7edb
......@@ -55,4 +55,5 @@ export {
getUnicodeSupportMap,
isEmojiNameValid,
isEmojiUnicodeSupported,
validEmojiNames,
};
import { glEmojiTag } from './behaviors/gl_emoji';
import { emojiMap, emojiAliases } from './emoji';
import { validEmojiNames } from './emoji';
import glRegexp from './lib/utils/regexp';
import AjaxCache from './lib/utils/ajax_cache';
......@@ -374,7 +374,7 @@ class GfmAutoComplete {
if (this.cachedData[at]) {
this.loadData($input, at, this.cachedData[at]);
} else if (GfmAutoComplete.atTypeMap[at] === 'emojis') {
this.loadData($input, at, Object.keys(emojiMap).concat(Object.keys(emojiAliases)));
this.loadData($input, at, validEmojiNames);
} else {
AjaxCache.retrieve(this.dataSources[GfmAutoComplete.atTypeMap[at]], true)
.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