mirror of https://gitlab.com/bashrc2/epicyon
Convert dictionary to list
parent
372edabd3d
commit
74ceb8dd28
|
@ -1414,7 +1414,7 @@ def contentWarningScript() -> str:
|
||||||
'}\n'
|
'}\n'
|
||||||
return script
|
return script
|
||||||
|
|
||||||
def htmlReplaceEmojiFromTags(content: str,tag: {}) -> str:
|
def htmlReplaceEmojiFromTags(content: str,tag: []) -> str:
|
||||||
"""Uses the tags to replace :emoji: with html image markup
|
"""Uses the tags to replace :emoji: with html image markup
|
||||||
"""
|
"""
|
||||||
for tagItem in tag:
|
for tagItem in tag:
|
||||||
|
@ -1616,12 +1616,16 @@ def addEmojiToDisplayName(baseDir: str,httpPrefix: str, \
|
||||||
"""
|
"""
|
||||||
if ':' in displayName:
|
if ':' in displayName:
|
||||||
displayName=displayName.replace('<p>','').replace('</p>','')
|
displayName=displayName.replace('<p>','').replace('</p>','')
|
||||||
emojiTags=[]
|
emojiTags={}
|
||||||
displayName= \
|
displayName= \
|
||||||
addHtmlTags(baseDir,httpPrefix, \
|
addHtmlTags(baseDir,httpPrefix, \
|
||||||
nickname,domain,displayName,emojiTags,{})
|
nickname,domain,displayName,[],emojiTags)
|
||||||
displayName=displayName.replace('<p>','').replace('</p>','')
|
displayName=displayName.replace('<p>','').replace('</p>','')
|
||||||
displayName=htmlReplaceEmojiFromTags(displayName,emojiTags)
|
# convert the emoji dictionary to a list
|
||||||
|
emojiTagsList=[]
|
||||||
|
for tagName,tag in emojiTags.items():
|
||||||
|
emojiTagsList.append(tag)
|
||||||
|
displayName=htmlReplaceEmojiFromTags(displayName,emojiTagsList)
|
||||||
return displayName
|
return displayName
|
||||||
|
|
||||||
def individualPostAsHtml(iconsDir: str,translate: {}, \
|
def individualPostAsHtml(iconsDir: str,translate: {}, \
|
||||||
|
|
Loading…
Reference in New Issue