Skip to content

Commit 44f6186

Browse files
committed
workaround a specific unicode bug in 3.12.1 in one step in spanish
1 parent 1b1e402 commit 44f6186

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

core/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,7 @@ def split_into_tokens_gen(s):
332332
for t1, t2 in zip(tokens, tokens[1:]):
333333
start1, end1 = token_text_range(t1, linenos)
334334
start2, end2 = token_text_range(t2, linenos)
335+
end1 = min(end1, start2) # workaround a specific unicode bug in 3.12.1
335336
assert start1 <= end1 <= start2 <= end2
336337
yield s[start1:end1]
337338
yield s[end1:start2]

0 commit comments

Comments
 (0)