Skip to content

Commit

Permalink
recursion check
Browse files Browse the repository at this point in the history
  • Loading branch information
Dpeta committed Jun 24, 2022
1 parent 7c7d406 commit 0eeebe3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dataobjs.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,11 @@ def apply(self, lexed, first=False, last=False):
if len(excludes) >= 1:
# SORT !!!
excludes.sort(key=lambda exclude: exclude.start())

# Recursion check.
# Strings like http://:3: require this.
for n in range(0, len(excludes)-1):
if excludes[n].end() > excludes[n+1].start():
excludes.pop(n)
# Seperate parts to be quirked.
sendparts = list()
# Add string until start of exclude at index 0.
Expand Down

0 comments on commit 0eeebe3

Please sign in to comment.