Kaydet (Commit) 14b90a49 authored tarafından Guido van Rossum's avatar Guido van Rossum

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".)
üst 86525224
...@@ -65,7 +65,7 @@ def decode(input, output): ...@@ -65,7 +65,7 @@ def decode(input, output):
if n > 0 and line[n-1] == '\n': if n > 0 and line[n-1] == '\n':
partial = 0; n = n-1 partial = 0; n = n-1
# Strip trailing whitespace # 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 n = n-1
else: else:
partial = 1 partial = 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment