Creating emoji dict

main
Bob Mottram 2021-11-01 23:34:11 +00:00
parent 63865bad6b
commit 9bafdef7bf
2 changed files with 4 additions and 3 deletions

View File

@ -905,8 +905,8 @@ def addHtmlTags(baseDir: str, httpPrefix: str,
customEmojiDict = \
loadJson(baseDir + '/emojicustom/emoji.json')
if customEmojiDict:
emojiDict = \
dict(emojiDict, **customEmojiDict)
newEmojiDict = dict(emojiDict, **customEmojiDict)
emojiDict = newEmojiDict
# print('TAG: looking up emoji for :' + wordStr2 + ':')
_addEmoji(baseDir, ':' + wordStr2 + ':', httpPrefix,

View File

@ -80,7 +80,8 @@ def htmlSearchEmoji(cssCache: {}, translate: {},
if emojiJson:
if os.path.isfile(customEmojiLookupFilename):
customEmojiJson = loadJson(customEmojiLookupFilename)
emojiJson = dict(emojiJson, **customEmojiJson)
newEmojiJson = dict(emojiJson, **customEmojiJson)
emojiDict = newEmojiJson
results = {}
for emojiName, filename in emojiJson.items():
if searchStr in emojiName: