From: Steinar H. Gunderson Date: Mon, 28 May 2012 14:41:25 +0000 (+0200) Subject: Fix some corruption issues in truncate-end.pl. X-Git-Url: https://git.sesse.net/?p=bursty;a=commitdiff_plain;h=725ffec44d53ddad34062abf7ccf1a1e86e810dd Fix some corruption issues in truncate-end.pl. --- diff --git a/truncate-end.pl b/truncate-end.pl index 4975426..4f8a5d5 100755 --- a/truncate-end.pl +++ b/truncate-end.pl @@ -7,9 +7,11 @@ my @buffer = (); while (<>) { chomp; - if (/\d /) { - print join("\n", @buffer); - @buffer = (); + if (/\d / && !/\*/) { + if (scalar @buffer > 0) { + print join("\n", @buffer), "\n"; + @buffer = (); + } print "$_\n"; } else { push @buffer, $_;