No second colon

main2
Bob Mottram 2019-10-09 19:32:53 +01:00
parent ffd290b681
commit 9ad5b34002
2 changed files with 18 additions and 25 deletions

View File

@ -311,10 +311,6 @@ def addHtmlTags(baseDir: str,httpPrefix: str, \
if ':' in wordStr:
print('TAG: emoji located - '+wordStr)
wordStr2=wordStr.split(':')[1]
print('TAG: wordStr2a - '+wordStr2)
if ':' in wordStr2:
wordStr2=wordStr2.split(':')[0]
print('TAG: wordStr2b - '+wordStr2)
if not emojiDict:
print('Loading emoji lookup')
if not os.path.isfile(baseDir+'/emoji/emoji.json'):

View File

@ -1637,10 +1637,7 @@ def addEmojiToDisplayName(baseDir: str,httpPrefix: str, \
# remove any stray emoji
while ':' in displayName:
nameStr=displayName.split(':')[1]
if ':' not in nameStr:
break
emojiStr=nameStr.split(':')[0]
emojiStr=displayName.split(':')[1]
displayName=displayName.replace(':'+emojiStr+':','').strip()
print('TAG: displayName after tags 3: '+displayName)
print('TAG: displayName after tag replacements: '+displayName)