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=733f2cc69cfc634363c5f5a3cb448d8f17056686 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 fdd5acc..27718d6 100755 --- a/stump/bin/submission.pl +++ b/stump/bin/submission.pl @@ -348,13 +348,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