Skip to content

Commit

Permalink
small efficiency update
Browse files Browse the repository at this point in the history
  • Loading branch information
tdegeus committed Jan 19, 2024
1 parent 0ec2dcf commit 401259e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions texplain/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -723,10 +723,9 @@ def _detail_text_to_placholders(
skip = False
if re.match(r"(?<!\\)(\\begin{)", line):
skip = True
if re.match(r"(?<!\\)(\\end{)", line):
elif re.match(r"(?<!\\)(\\end{)", line):
skip = True
# existing placeholder
if re.match(r"(\-%s\-)(\w*\-)*(\d+\-)" % base, line):
elif re.match(r"(\-%s\-)(\w*\-)*(\d+\-)" % base, line): # existing placeholder
skip = True
n = len(line)
if not skip:
Expand Down

0 comments on commit 401259e

Please sign in to comment.