From: Ian Jackson Date: Wed, 5 Sep 2018 13:26:39 +0000 (+0100) Subject: unfolding: exempt References X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~webstump/git?p=modbot-ulm.git;a=commitdiff_plain;h=986246af9b1351ba64b6764e0908facb83c7431b unfolding: exempt References Signed-off-by: Ian Jackson (cherry picked from commit 4cae2550adca858ce289d060a3afc68ad23ac8a7) --- diff --git a/stump/bin/submission.pl b/stump/bin/submission.pl index 8a18853..565d2d4 100755 --- a/stump/bin/submission.pl +++ b/stump/bin/submission.pl @@ -342,13 +342,15 @@ sub readMessage { # In these cases, keep that in $readahead for now, # and process the previous header, which is in $_. # But, first, a wrinkle ... - push @unfolded, (m/^[^:]+:/ ? $& : '????') + if (!m/^(?:References):/i) { + push @unfolded, (m/^[^:]+:/ ? $& : '????') if s/\n(?=.)/ /g; - if (length $_ > 505) { #wtf - $_ = substr($_, 0, 500); - $_ =~ s/\n?$/\n/; - $readahead = $_; - $_ = $warning->("Next header truncated!"); + if (length $_ > 505) { #wtf + $_ = substr($_, 0, 500); + $_ =~ s/\n?$/\n/; + $readahead = $_; + $_ = $warning->("Next header truncated!"); + } } } else { # $_ is empty line at end of headers