chiark / gitweb /
Avoid printing removed lines unless necessary; avoid version headers.
authorMark Wooding <mdw@distorted.org.uk>
Tue, 29 Apr 2014 23:13:28 +0000 (00:13 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Tue, 29 Apr 2014 23:13:28 +0000 (00:13 +0100)
convert

diff --git a/convert b/convert
index eb1ca3c..7541ff1 100755 (executable)
--- a/convert
+++ b/convert
@@ -93,7 +93,8 @@ perl -ne '
                $out .= $_;
        END {
                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 $!;