mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Make sure \text{...} is counted correctly in num_tex_symbols
This commit is contained in:
parent
b644bb51de
commit
d1e2a7a157
1 changed files with 1 additions and 1 deletions
|
@ -16,7 +16,7 @@ def num_tex_symbols(tex: str) -> int:
|
||||||
# \begin{array}{cc}, etc.
|
# \begin{array}{cc}, etc.
|
||||||
pattern = "|".join(
|
pattern = "|".join(
|
||||||
rf"(\\{s})" + r"(\{\w+\})?(\{\w+\})?(\[\w+\])?"
|
rf"(\\{s})" + r"(\{\w+\})?(\{\w+\})?(\[\w+\])?"
|
||||||
for s in ["begin", "end", "phantom", "text"]
|
for s in ["begin", "end", "phantom"]
|
||||||
)
|
)
|
||||||
tex = re.sub(pattern, "", tex)
|
tex = re.sub(pattern, "", tex)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue