mirror of https://github.com/zulip/zulip.git
build_emoji: Add `name_to_codepoint` dict to emoji_codes.js file.
This commit is contained in:
parent
1b0d3cbb39
commit
3651a432d5
|
@ -42,6 +42,8 @@ exports.names = %(names)s;
|
||||||
|
|
||||||
exports.codepoints = %(codepoints)s;
|
exports.codepoints = %(codepoints)s;
|
||||||
|
|
||||||
|
exports.name_to_codepoint = %(name_to_codepoint)s;
|
||||||
|
|
||||||
return exports;
|
return exports;
|
||||||
}());
|
}());
|
||||||
if (typeof module !== 'undefined') {
|
if (typeof module !== 'undefined') {
|
||||||
|
@ -248,7 +250,8 @@ def dump_emojis(cache_path):
|
||||||
|
|
||||||
emoji_codes_file.write(EMOJI_CODES_FILE_TEMPLATE % {
|
emoji_codes_file.write(EMOJI_CODES_FILE_TEMPLATE % {
|
||||||
'names': names,
|
'names': names,
|
||||||
'codepoints': sorted([str(code_point) for code_point in set(emoji_map.values())])
|
'codepoints': sorted([str(code_point) for code_point in set(emoji_map.values())]),
|
||||||
|
'name_to_codepoint': {str(key): str(emoji_map[key]) for key in emoji_map}
|
||||||
})
|
})
|
||||||
emoji_codes_file.close()
|
emoji_codes_file.close()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue