chiark / gitweb /
Wrap long single-line comment messages.
[adns.git] / convert
diff --git a/convert b/convert
index eb1ca3c46772a8fb2b53eeed71428683bd81c515..6c7278d4bda4d21dcb3fd563f484335b293b38ee 100755 (executable)
--- a/convert
+++ b/convert
@@ -92,8 +92,15 @@ cat >$tmp/msg-filter <<'FEND'
 perl -ne '
                $out .= $_;
        END {
+               if ($out !~ /\n.*\n/) {
+                       $out = `fmt <<'\''EOF'\''
+$out
+EOF
+`;
+               }
                if ($out =~ m/^\@\@/s &&
-                   $out =~ m/^(?:\+ )?[^\@ ].*\w.*$/m) {
+                   ($out =~ m/^\+(?!u?adns).*\w.*$/m ||
+                    $out =~ m/^\-(?!u?adns).*\w.*$/m)) {
                        print $&, "\n\n" or die $!;
                }
                print $out or die $!;