Update tex patterns

This commit is contained in:
Grant Sanderson 2023-02-01 20:12:06 -08:00
parent f4a6f99b54
commit ebf2ee5849

View file

@ -16,7 +16,7 @@ def num_tex_symbols(tex: str) -> int:
# \begin{array}{cc}, etc.
pattern = "|".join(
rf"(\\{s})" + r"(\{\w+\})?(\{\w+\})?(\[\w+\])?"
for s in ["begin", "end", "phantom"]
for s in ["begin", "end", "phantom", "text"]
)
tex = re.sub(pattern, "", tex)