summaryrefslogtreecommitdiff
path: root/devtools
diff options
context:
space:
mode:
Diffstat (limited to 'devtools')
-rwxr-xr-xdevtools/clean-whitespace.pl1
1 files changed, 1 insertions, 0 deletions
diff --git a/devtools/clean-whitespace.pl b/devtools/clean-whitespace.pl
index ace00b5..bbde48e 100755
--- a/devtools/clean-whitespace.pl
+++ b/devtools/clean-whitespace.pl
@@ -10,6 +10,7 @@ foreach my $f (@files) {
my $after = $before;
$after =~ s/\t/ /g;
$after =~ s/\s+$//mg;
+ $after .= "\n" unless $after =~ /\n$/;
next if $after eq $before;
open(my $fh, ">$f") or die;
print $fh $after;