From d1e2a7a157a7ea5076cd4ab3c6167ba749e51507 Mon Sep 17 00:00:00 2001 From: Grant Sanderson Date: Fri, 10 Mar 2023 11:05:30 -0800 Subject: [PATCH] Make sure \text{...} is counted correctly in num_tex_symbols --- manimlib/utils/tex.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manimlib/utils/tex.py b/manimlib/utils/tex.py index 791cdc5c..719d228a 100644 --- a/manimlib/utils/tex.py +++ b/manimlib/utils/tex.py @@ -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", "text"] + for s in ["begin", "end", "phantom"] ) tex = re.sub(pattern, "", tex)