Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
comment on the futility of stripped-emoji.json
Browse files Browse the repository at this point in the history
  • Loading branch information
ara4n committed May 19, 2019
1 parent 8133830 commit b0ec594
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/autocomplete/EmojiProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit b0ec594

Please sign in to comment.