Combine emoji sets one by one

main
Bob Mottram 2022-01-30 18:07:20 +00:00
parent 7adcb33d61
commit f896bef6c6
1 changed files with 8 additions and 1 deletions

View File

@ -939,10 +939,17 @@ def add_html_tags(base_dir: str, http_prefix: str,
custom_emoji_dict = \
load_json(base_dir + '/emojicustom/emoji.json')
if custom_emoji_dict:
emojis_combined = True
try:
emoji_dict = dict(emoji_dict, **custom_emoji_dict)
except BaseException:
pass
emojis_combined = False
if not emojis_combined:
# combine emoji dicts one by one
for emoji_name, emoji_item in \
custom_emoji_dict.items():
if not emoji_dict.get(emoji_name):
emoji_dict[emoji_name] = emoji_item
# print('TAG: looking up emoji for :' + word_str2 + ':')
_add_emoji(base_dir, ':' + word_str2 + ':', http_prefix,