]> granicus.if.org Git - python/commitdiff
_split_ascii(): lstrip the individual lines in the ascii split lines,
authorBarry Warsaw <barry@python.org>
Fri, 7 Mar 2003 23:24:34 +0000 (23:24 +0000)
committerBarry Warsaw <barry@python.org>
Fri, 7 Mar 2003 23:24:34 +0000 (23:24 +0000)
since we'll be adding our own continuation whitespace later.

Lib/email/Header.py

index afd815fcea41f434be65884be9703a89f0c2c8a8..245ffc8574b1bd0c71332c10b9bc9615e10b7eef 100644 (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