Merge pull request #1481 from libinglong/lbl-fix-tex

fix issue #1480
This commit is contained in:
Grant Sanderson 2021-06-14 09:50:20 -07:00 committed by GitHub
commit e9ea5fbea0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -180,7 +180,10 @@ class Tex(SingleStringTex):
pattern = "|".join(patterns)
pieces = []
for s in tex_strings:
pieces.extend(re.split(pattern, s))
if pattern:
pieces.extend(re.split(pattern, s))
else:
pieces.append(s)
return list(filter(lambda s: s, pieces))
def break_up_by_substrings(self):