diff --git a/src/fenrirscreenreader/core/punctuationManager.py b/src/fenrirscreenreader/core/punctuationManager.py index f7c6bfb6..767d62ae 100644 --- a/src/fenrirscreenreader/core/punctuationManager.py +++ b/src/fenrirscreenreader/core/punctuationManager.py @@ -38,8 +38,10 @@ class punctuationManager(): resultText = str(text) if customDict: for key,item in customDict.items(): - #resultText = resultText.replace(str(key),seperator + str(item) + seperator) - resultText = re.sub(str(key), seperator + str(item) + seperator, resultText) + try: + resultText = re.sub(str(key), seperator + str(item) + seperator, resultText) + except: + resultText = resultText.replace(str(key),seperator + str(item) + seperator) return resultText def usePunctuationDict(self, text, punctuationDict, punctuation): resultText = str(text)