Fixed bad escape character (#24316)

As of Python 3.7, a backslash-character pair that is not a valid escape sequence now generates an error, earlier it was a deprecation warning.
This commit is contained in:
M. Zulqarnain
2020-06-24 18:23:11 +05:00
committed by GitHub
parent 45d277beb6
commit 39b109a9ad

View File

@@ -84,7 +84,7 @@ def to_latex(expr):
# sometimes get 'script(N)__B' or more complicated terms
expr_s = re.sub(
r'script([a-zA-Z0-9]+)',
'\\mathcal{\\1}',
r'\\mathcal{\\1}',
expr_s
)