diff --git a/mobject/svg/tex_mobject.py b/mobject/svg/tex_mobject.py index c96905af..3c631820 100644 --- a/mobject/svg/tex_mobject.py +++ b/mobject/svg/tex_mobject.py @@ -86,7 +86,7 @@ class SingleStringTexMobject(SVGMobject): should_replace = reduce(op.and_, [ t1 in tex, t2 not in tex, - len(tex) > len(t1) + len(tex) > len(t1) and tex[len(t1)] in ["(){}[]|.\\"] ]) if should_replace: tex = tex.replace(t1, "\\big")