We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5b49cac + 90dc7be commit 80cd36cCopy full SHA for 80cd36c
1 file changed
source/speechDictHandler/__init__.py
@@ -44,7 +44,8 @@ def sub(self, text: str) -> str:
44
if self.type == ENTRY_TYPE_REGEXP:
45
replacement = self.replacement
46
else:
47
- replacement = re.escape(self.replacement)
+ # Escape the backslashes for non-regexp replacements
48
+ replacement = self.replacement.replace('\\', '\\\\')
49
return self.compiled.sub(replacement, text)
50
51
class SpeechDict(list):
0 commit comments