_split_ascii(): lstrip the individual lines in the ascii split lines,

since we'll be adding our own continuation whitespace later.
This commit is contained in:
Barry Warsaw 2003-03-07 23:24:34 +00:00
parent 28ffcef4e6
commit 33975eac3d
1 changed files with 3 additions and 0 deletions

View File

@ -416,6 +416,9 @@ def _split_ascii(s, firstlen, restlen, continuation_ws, splitchars):
lines = []
maxlen = firstlen
for line in s.splitlines():
# Ignore any leading whitespace (i.e. continuation whitespace) already
# on the line, since we'll be adding our own.
line = line.lstrip()
if len(line) < maxlen:
lines.append(line)
maxlen = restlen