latex
latex copied to clipboard
Fix escape for undefined variables
If the escape filter is used for an undefined variable (e.g. r'\VAR{foo|e}'
with template.render()
), latex.escape:61 will raise an error: TypeError: expected string or bytes-like object
. This PR should fix it.
Automated benchmark results (pass #0): passed
concurrency: 32
requests per second: 6160
concurrency: 128
requests per second: 7641
concurrency: 512
requests per second: 4685
concurrency: 1024
requests per second: 4006