From f896bef6c6deca50414bf2eb725709463ce7f7ce Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 30 Jan 2022 18:07:20 +0000 Subject: [PATCH] Combine emoji sets one by one --- content.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/content.py b/content.py index 4448d0d5d..7faad7783 100644 --- a/content.py +++ b/content.py @@ -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,