Skip to content

Commit

Permalink
Fix bad scape
Browse files Browse the repository at this point in the history
Traceback (most recent call last):
  File "/usr/lib/python3.8/sre_parse.py", line 1039, in parse_template
    this = chr(ESCAPES[this][1])
KeyError: '\\s'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "adaptador.py", line 26, in <module>
    examples_utf8 = re.sub(r'%s' % inputregex, r'%s' % outputregex, examples_utf8)
  File "/usr/lib/python3.8/re.py", line 210, in sub
    return _compile(pattern, flags).sub(repl, string, count)
  File "/usr/lib/python3.8/re.py", line 327, in _subx
    template = _compile_repl(template, pattern)
  File "/usr/lib/python3.8/re.py", line 318, in _compile_repl
    return sre_parse.parse_template(repl, pattern)
  File "/usr/lib/python3.8/sre_parse.py", line 1042, in parse_template
    raise s.error('bad escape %s' % this, len(this))
re.error: bad escape \s at position 2
  • Loading branch information
sim6 committed Dec 5, 2020
1 parent f73e32e commit c6ad95e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion replacements.xml
Original file line number Diff line number Diff line change
Expand Up @@ -978,6 +978,6 @@
</replacement>
<replacement>
<input><![CDATA[(\b|_)es desarà\b]]></input>
<output><![CDATA[\1\s'alçarà]]></output>
<output><![CDATA[\1s'alçarà]]></output>
</replacement>
</replacements>

0 comments on commit c6ad95e

Please sign in to comment.