From ae05b79ccc0d4cae8c0f0da298369ddb634d9818 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 6 Sep 2017 09:11:00 +0200 Subject: bin/interpret-mail: remove linebreaks (more) correctly --- bin/interpret-mail | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'bin/interpret-mail') diff --git a/bin/interpret-mail b/bin/interpret-mail index 1b3d0d3..effca9c 100755 --- a/bin/interpret-mail +++ b/bin/interpret-mail @@ -98,18 +98,14 @@ sed -n ' p ' "${tmp_dir}/plain-content" | sed ' - :a - /[:=]\s*$/{ + :start_loop + $!{ N - s/:\s*\n/: / - ta - s/=\n//g - ta + bstart_loop } - :b - N - s/\n\([^ :]\+\(\s\|\n\)\)/ \1/ - tb + s/=\s*\n//g + s/:\s*\n/: /g + s/\n\(\S\+[^: ]\(\s\|\n\|$\)\)/ \1/g ' > \ "${tmp_dir}/raw-content" -- cgit v1.2.3-70-g09d2