strip tex strings so that they're easier to match

This commit is contained in:
Grant Sanderson
2021-01-06 16:14:16 -08:00
parent 63692ed59a
commit 4a19c48667

View File

@ -198,7 +198,8 @@ class TexMobject(SingleStringTexMobject):
config = dict(self.CONFIG)
config["alignment"] = ""
for tex_string in self.tex_strings:
if len(tex_string.strip()) == 0:
tex_string = tex_string.strip()
if len(tex_string) == 0:
continue
sub_tex_mob = SingleStringTexMobject(tex_string, **config)
num_submobs = len(sub_tex_mob.submobjects)