mmime: keep (none) whitespace after quoted strings

pull/211/head
Leah Neukirchen 3 years ago
parent 0370916357
commit d324b92dd4

@ -312,6 +312,7 @@ print_header(char *line) {
}
int prevq = 0; // was the previous word encoded as qp?
char prevqs = 0; // was the previous word a quoted-string?
ssize_t linelen = s - line;
@ -354,7 +355,7 @@ print_header(char *line) {
// space at beginning of line
goto force_qp;
}
if (*s != ' ') {
if (*s != ' ' && !(prevqs && !prevq && *(s-1) != ' ')) {
printf(" ");
linelen++;
}
@ -388,6 +389,7 @@ force_qp:
if (qs && *e == '"')
e++;
}
prevqs = qs;
s = e;
}
printf("\n");

Loading…
Cancel
Save