Remove quotes later

This allows things like leading or trailing spaces to be matched
main
Bob Mottram 2020-02-19 19:36:41 +00:00
parent 4472056cd6
commit 541f4d9c13
1 changed files with 3 additions and 3 deletions

View File

@ -21,7 +21,7 @@ def switchWords(baseDir: str,nickname: str,domain: str,content: str) -> str:
return content
with open(switchWordsFilename, 'r') as fp:
for line in fp:
replaceStr=line.replace('\n','').replace('"','')
replaceStr=line.replace('\n','')
wordTransform=None
if '->' in replaceStr:
wordTransform=replaceStr.split('->')
@ -37,8 +37,8 @@ def switchWords(baseDir: str,nickname: str,domain: str,content: str) -> str:
continue
if len(wordTransform)==2:
content= \
content.replace(wordTransform[0].strip(), \
wordTransform[1].strip())
content.replace(wordTransform[0].strip().replace('"',''), \
wordTransform[1].strip().replace('"',''))
return content
def replaceEmojiFromTags(content: str,tag: [],messageType: str) -> str: