chiark / gitweb /
unfolding: exempt References
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 5 Sep 2018 13:26:39 +0000 (14:26 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 5 Sep 2018 13:53:06 +0000 (14:53 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
(cherry picked from commit 4cae2550adca858ce289d060a3afc68ad23ac8a7)

stump/bin/submission.pl

index 8a18853d8d073e73271cfeeb7cf4943705d2c5af..565d2d462c7fb6cf200ccc48c49180229f8d8c81 100755 (executable)
@@ -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