Skip to content

Commit

Permalink
workaround a specific unicode bug in 3.12.1 in one step in spanish
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmojaki committed Oct 27, 2024
1 parent 1b1e402 commit 44f6186
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ def split_into_tokens_gen(s):
for t1, t2 in zip(tokens, tokens[1:]):
start1, end1 = token_text_range(t1, linenos)
start2, end2 = token_text_range(t2, linenos)
end1 = min(end1, start2) # workaround a specific unicode bug in 3.12.1
assert start1 <= end1 <= start2 <= end2
yield s[start1:end1]
yield s[end1:start2]
Expand Down

0 comments on commit 44f6186

Please sign in to comment.