jemdoc_mathjax icon indicating copy to clipboard operation
jemdoc_mathjax copied to clipboard

jemdoc: fix string syntax warnings

Open gajjanag opened this issue 7 months ago • 0 comments

Clean up the Python strings to avoid warnings like:

/usr/bin/jemdoc:717: SyntaxWarning: invalid escape sequence '\$' b = re.sub("!\$%s\$!" % m, 'FAILED_MATCH_' + m, b) /usr/bin/jemdoc:719: SyntaxWarning: invalid escape sequence '\$' b = re.sub("!\$%s\$!" % m, repl, b) /usr/bin/jemdoc:895: SyntaxWarning: invalid escape sequence '\w' d['error'] = ['\w*Error',] /usr/bin/jemdoc:904: SyntaxWarning: invalid escape sequence '\w' d['error'] = ['\w*Error',] /usr/bin/jemdoc:913: SyntaxWarning: invalid escape sequence '\w' d['error'] = putbsbs(['\w*Error',]) /usr/bin/jemdoc:931: SyntaxWarning: invalid escape sequence '\.' 'ifconfig', 'git', '(?<!\.)tar(?!\.)']) /usr/bin/jemdoc:937: SyntaxWarning: invalid escape sequence '\.' d['operator'] = ['&gt;', 'ans =', '>>', '~', '\.\.\.'] /usr/bin/jemdoc:1029: SyntaxWarning: invalid escape sequence '\d' preamble = '\documentclass{article}\n' /usr/bin/jemdoc:1036: SyntaxWarning: invalid escape sequence '\p' preamble += '\pagestyle{empty}\n\\begin{document}\n' /usr/bin/jemdoc:1046: SyntaxWarning: invalid escape sequence '\e' g.write('\n\\newpage\n\end{document}') /usr/bin/jemdoc:1196: SyntaxWarning: invalid escape sequence '\~' for x in ('#', '~', '>>>', '\~', '{'): /usr/bin/jemdoc:1421: SyntaxWarning: invalid escape sequence '\)' if not s.strip().endswith('\)'): /usr/bin/jemdoc:1427: SyntaxWarning: invalid escape sequence '\)' if l.strip() == '\)':

gajjanag avatar Jun 30 '24 16:06 gajjanag