From b0ec594c5a3f2faed4c957d926dd6a65bc17e053 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Sun, 19 May 2019 21:19:20 +0100 Subject: [PATCH] comment on the futility of stripped-emoji.json --- src/autocomplete/EmojiProvider.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/autocomplete/EmojiProvider.js b/src/autocomplete/EmojiProvider.js index 51b1a3007c..9f0800c6ff 100644 --- a/src/autocomplete/EmojiProvider.js +++ b/src/autocomplete/EmojiProvider.js @@ -35,6 +35,9 @@ const LIMIT = 20; // Match for ascii-style ";-)" emoticons or ":wink:" shortcodes provided by emojibase const EMOJI_REGEX = new RegExp('(' + EMOTICON_REGEX.source + '|:[+-\\w]*:?)$', 'g'); +// XXX: it's very unclear why we bother with this generated emojidata file. +// all it means is that we end up bloating the bundle with precomputed stuff +// which would be trivial to calculate and cache on demand. const EMOJI_SHORTNAMES = Object.keys(EmojiData).map((key) => EmojiData[key]).sort( (a, b) => { if (a.category === b.category) {