]> cat aescling's git repositories - mastodon.git/commit
Fix emojify() by generating a mapping to existing Twemoji files (#5080)
authorEugen Rochko <eugen@zeonfederated.com>
Mon, 25 Sep 2017 16:36:33 +0000 (18:36 +0200)
committerGitHub <noreply@github.com>
Mon, 25 Sep 2017 16:36:33 +0000 (18:36 +0200)
commit510df0ac556377f6dcd2f7e3e6237ef6035f06d6
tree12be7c2e312719b6644ee927d2b76e15f9b1d839
parent98936bfcdf48cfd25968d1314ecf41be7d4596c3
Fix emojify() by generating a mapping to existing Twemoji files (#5080)

A new rake task emojis:generate downloads a full list of valid
unicode sequences from unicode.org and checks it against existing
Twemoji files, finally generating a map from each sequence to the
existing file (e.g. when there's multiple ways an emoji can be
expressed). The map is dumped into app/javascript/mastodon/emoji_map.json

That file is loaded by emojione_light.js (now a misnomer) which
decorates it further with shortcodes taken from emoji-mart's index.
app/javascript/mastodon/emoji_map.json [new file with mode: 0644]
app/javascript/mastodon/emojione_light.js
lib/tasks/emojis.rake [new file with mode: 0644]
spec/javascript/components/emojify.test.js