summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2017-06-26 22:48:41 -0500
committerMike Greiling <mike@pixelcog.com>2017-06-26 22:50:57 -0500
commit88114c41fb4cb1c281df613ee8647c63848e37ea (patch)
tree72e00520b4ccc4d7e21eea6a7c5c364d8eda72b9 /app
parent527e7edbc4251644867ef02a2e055815d3f28a82 (diff)
downloadgitlab-ce-88114c41fb4cb1c281df613ee8647c63848e37ea.tar.gz
export validEmojiNames for autocomplete
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/emoji/index.js1
-rw-r--r--app/assets/javascripts/gfm_auto_complete.js4
2 files changed, 3 insertions, 2 deletions
diff --git a/app/assets/javascripts/emoji/index.js b/app/assets/javascripts/emoji/index.js
index 09ceca58e9c..70346c985e9 100644
--- a/app/assets/javascripts/emoji/index.js
+++ b/app/assets/javascripts/emoji/index.js
@@ -55,4 +55,5 @@ export {
getUnicodeSupportMap,
isEmojiNameValid,
isEmojiUnicodeSupported,
+ validEmojiNames,
};
diff --git a/app/assets/javascripts/gfm_auto_complete.js b/app/assets/javascripts/gfm_auto_complete.js
index 64d47a0d75e..9d057fd22a8 100644
--- a/app/assets/javascripts/gfm_auto_complete.js
+++ b/app/assets/javascripts/gfm_auto_complete.js
@@ -1,5 +1,5 @@
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) => {