mirror of
https://github.com/python/cpython.git
synced 2024-11-24 10:24:35 +08:00
Strip \r as trailing whitespace as part of soft line endings.
Inspired by SF patch #408597 (Walter Dörwald): quopri, soft line breaks and CRLF. (I changed (" ", "\t", "\r") into " \t\r".)
This commit is contained in:
parent
8652522442
commit
14b90a498f
@ -65,7 +65,7 @@ def decode(input, output):
|
||||
if n > 0 and line[n-1] == '\n':
|
||||
partial = 0; n = n-1
|
||||
# Strip trailing whitespace
|
||||
while n > 0 and line[n-1] in (' ', '\t'):
|
||||
while n > 0 and line[n-1] in " \t\r":
|
||||
n = n-1
|
||||
else:
|
||||
partial = 1
|
||||
|
Loading…
Reference in New Issue
Block a user