mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
gh-125008: Fix tokenize.untokenize
roundtrip for \n{{
(#125013)
This commit is contained in:
parent
39c859f6ff
commit
db23b8bb13
3 changed files with 23 additions and 1 deletions
|
@ -200,7 +200,7 @@ class Untokenizer:
|
|||
characters[-2::-1]
|
||||
)
|
||||
)
|
||||
if n_backslashes % 2 == 0:
|
||||
if n_backslashes % 2 == 0 or characters[-1] != "N":
|
||||
characters.append(character)
|
||||
else:
|
||||
consume_until_next_bracket = True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue