From bff9f74b04ecde39fde17934fe8b0af8229de2c3 Mon Sep 17 00:00:00 2001 From: YishiMichael Date: Tue, 12 Apr 2022 23:19:10 +0800 Subject: [PATCH] Prevent from passing an empty string --- manimlib/mobject/svg/mtex_mobject.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manimlib/mobject/svg/mtex_mobject.py b/manimlib/mobject/svg/mtex_mobject.py index 9f35f620..a219cc19 100644 --- a/manimlib/mobject/svg/mtex_mobject.py +++ b/manimlib/mobject/svg/mtex_mobject.py @@ -33,7 +33,7 @@ class MTex(LabelledString): def __init__(self, tex_string: str, **kwargs): # Prevent from passing an empty string. - if not tex_string: + if not tex_string.strip(): tex_string = "\\\\" self.tex_string = tex_string super().__init__(tex_string, **kwargs)