Fixed invalid escape sequences.

This commit is contained in:
Storm Dragon
2024-10-20 19:48:05 -04:00
parent f5242f7092
commit 8ae82cbc4b
3 changed files with 5 additions and 5 deletions

View File

@ -41,7 +41,7 @@ class command():
# get the word
newContent = self.env['screen']['newContentText'].split('\n')[cursorPos['y']]
x, y, currWord, endOfScreen, lineBreak = word_utils.getCurrentWord(cursorPos['x'], 0, newContent)
currWord = currWord.strip(string.whitespace + '!"#$%&\()*+,-./:;<=§>?@[\\]^_{|}~')
currWord = currWord.strip(string.whitespace + r'!"#$%&\()*+,-./:;<=Â?@[\\]^_{|}~')
if currWord != '':
if self.spellChecker.is_added(currWord):

View File

@ -44,7 +44,7 @@ class command():
# get the word
newContent = self.env['screen']['newContentText'].split('\n')[cursorPos['y']]
x, y, currWord, endOfScreen, lineBreak = word_utils.getCurrentWord(cursorPos['x'], 0, newContent)
currWord = currWord.strip(string.whitespace + '!"#$%&\()*+,-./:;<=§>?@[\\]^_{|}~')
currWord = currWord.strip(string.whitespace + r'!"#$%&()*+,-./:;<=Â?@[\\]^_{|}~')
if not currWord.isspace():
if self.spellChecker.is_removed(currWord):
self.env['runtime']['outputManager'].presentText(_('{0} is not in the dictionary').format(currWord,), soundIcon='Cancel', interrupt=True)