One function
read_tex in alvinwan/TexSoup
The author described this change as “added fix for special puncutation commands”. It counts as a record because the check below fails on the code as it stood at 592160172 and passes on 5e6f59bdc, with nothing else changed between the two runs.
Projectalvinwan/TexSoup
Fix saved2017-09-03
Sharing licenceBSD-2-Clause · LICENSE
Change size+2 −0
What the code was meant to do, written into the code itself as a docstring
Read next expression from buffer :param Buffer src: a buffer of tokens
The change
| 28 | 28 | if src.startswith('$'): | |
| 29 | 29 | expr.add_contents(read_tex(src)) | |
| 30 | 30 | return expr | |
| 31 | + | if c.startswith('\\'): | |
| 32 | + | return TexCmd(c[1:]) | |
| 31 | 33 | if c in ARG_START_TOKENS: | |
| 32 | 34 | return read_arg(src, c) | |
| 33 | 35 | return c |
The check that tells the two apart
fail→pass·tests/test_parser.py::test_punctuation_command_structure
Check file tests/test_parser.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.
Origin and history
The code before it592160172bfb624bce4ca40d3db06216b9f6c33e
Broken version dated2017-09-03
ModuleTexSoup.reader
Units changedread_tex
Fingerprint28f5428bb9d9e97f
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.