Skip to content

Commit

Permalink
更新 phystokens.py
Browse files Browse the repository at this point in the history
  • Loading branch information
LiuYinCarl authored Aug 27, 2024
1 parent 22cd381 commit a1aa6b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions coverage/phystokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ def _phys_tokens(toks: TokenInfos) -> TokenInfos:
if last_ttext.endswith("\\"):
inject_backslash = False
elif ttype == token.STRING:
if last_line.endswith(last_ttext + "\\\n"):
if last_line.endswith("\\\n") and last_line.rstrip(" \\\n").endswith(last_text):
# Deal with special cases like such code::
#
# a = ["aaa",\
# a = ["aaa",\ # there may be zero or more blanks between "," and "\".
# "bbb \
# ccc"]
#
Expand Down

0 comments on commit a1aa6b8

Please sign in to comment.