aboutsummaryrefslogtreecommitdiffstats
path: root/filters/wrap.c
diff options
context:
space:
mode:
Diffstat (limited to 'filters/wrap.c')
-rw-r--r--filters/wrap.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/filters/wrap.c b/filters/wrap.c
index cfe86581..5f5279c8 100644
--- a/filters/wrap.c
+++ b/filters/wrap.c
@@ -246,11 +246,13 @@ static struct paragraph *parse_line(const wchar_t *buf)
letters++;
}
}
- /* strip trailing whitespace */
+ /* strip trailing whitespace unless it is a signature delimiter */
flowed = false;
- while (e > q && iswspace(buf[e - 1])) {
- e--;
- flowed = true;
+ if (wcscmp(&buf[q], L"-- ") != 0) {
+ while (e > q && iswspace(buf[e - 1])) {
+ e--;
+ flowed = true;
+ }
}
text_len = e - q;
@@ -287,7 +289,7 @@ static bool is_continuation(
if (is_empty(next->text))
/* empty or whitespace only line */
return false;
- if (wcscmp(p->text, L"--") == 0)
+ if (wcscmp(p->text, L"--") == 0 || wcscmp(p->text, L"-- ") == 0)
/* never join anything with signature start */
return false;
if (p->flowed)