Skip to content

Commit

Permalink
*** error!
Browse files Browse the repository at this point in the history
  • Loading branch information
gbenson committed Jun 7, 2024
1 parent 4ffaa4c commit 017cb55
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/dom_tokenizers/pre_tokenizers/splitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,12 @@ def _sub_js_escape(self, splits, cursor):
curr = splits[cursor_limit]
cursor_limit += 1

if not curr:
with open("bad-fails.log", "a") as fp:
print(splits[max(cursor-10, 0):min(cursor+10, len(splits))],
file=fp)
curr = "[error]" # XXX what to do?

# Store what we want at `splits[cursor:cursor_limit]` in `result`.
match curr[0]:
case "'":
Expand Down

0 comments on commit 017cb55

Please sign in to comment.