Don't insert an extra space at the end of the line when doing a soft fold.

Trailing whitespaces are best avoided.
This commit is contained in:
Jonathan Bastien-Filiatrault
2018-12-12 21:30:56 -05:00
parent 2d474d6b04
commit 6b4127f920
2 changed files with 5 additions and 4 deletions
+2 -1
View File
@@ -399,9 +399,10 @@ def fold(header, namelen=0):
i = header[:maxleng].rfind(b" ")
if i == -1:
j = maxleng
pre += header[:j] + b"\r\n "
else:
j = i + 1
pre += header[:j] + b"\r\n "
pre += header[:i] + b"\r\n "
header = header[j:]
maxleng = 72
if len(header) > 2: