| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
... by telling TeX to treat \u2212 (unicode minus) as a minus sign.
This also uncovered a bug in _parse_enc (basically, there can be
multiple character entries per line, so one needs to use `.split()`
instead of `.split("\n")`.
| no_comments = "\n".join(line.split("%")[0].rstrip() for line in file) | ||
| array = re.search(r"(?s)\[(.*)\]", no_comments).group(1) | ||
| lines = [line for line in array.split("\n") if line] | ||
| lines = [line for line in array.split() if line] |
There was a problem hiding this comment.
Why is this change?
Sorry, something went wrong.
There was a problem hiding this comment.
Because the previous version was buggy: on an encoding file like http://tug.ctan.org/info/fontname/8r.enc, you can see there are multiple entries per line (/.notdef /dotaccent /...) and lines are starting with a space, so the previous parser would fail immediately below when asserting that all lines start with a /, and even without the assertion, would misparse the file.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
... by telling TeX to treat \u2212 (unicode minus) as a minus sign.
This also uncovered a bug in _parse_enc (basically, there can be
multiple character entries per line, so one needs to use .split()
instead of .split("\n").
Closes #8423 (more accurately, #8423 (comment); the original version of the bug is already closed by #11381).
PR Summary
PR Checklist