Skip to content

Fix escape for undefined variables - #31

Merged
mbr merged 1 commit into
mbr:masterfrom
Gerrit-K:master
Sep 6, 2026
Merged

Fix escape for undefined variables#31
mbr merged 1 commit into
mbr:masterfrom
Gerrit-K:master

Conversation

@Gerrit-K

Copy link
Copy Markdown
Contributor

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.

@P1robot

P1robot commented Jan 24, 2020

Copy link
Copy Markdown

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

@mbr

mbr commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Guess that brings it in line with \VAR{name}. Merging, thanks.

@mbr
mbr merged commit d21e166 into mbr:master Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants