mirror of
https://github.com/3b1b/manim.git
synced 2025-11-14 12:07:45 +00:00
Tiny cleanup
This commit is contained in:
parent
0f9adbf91c
commit
7df12c68dc
1 changed files with 1 additions and 1 deletions
|
|
@ -15,7 +15,7 @@ def num_tex_symbols(tex: str) -> int:
|
|||
# First, remove patterns like \begin{align}, \phantom{thing},
|
||||
# \begin{array}{cc}, etc.
|
||||
pattern = "|".join(
|
||||
r"(\\" + s + ")" + r"(\{\w+\})?(\{\w+\})?(\[\w+\])?"
|
||||
rf"(\\{s})" + r"(\{\w+\})?(\{\w+\})?(\[\w+\])?"
|
||||
for s in ["begin", "end", "phantom"]
|
||||
)
|
||||
for tup in re.findall(pattern, tex):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue