Task to remove consecutive blank lines

This commit is contained in:
Stephen Caudill 2010-09-25 12:11:04 -04:00
parent 536cea5e44
commit ebf4999054

View file

@ -7,5 +7,9 @@ namespace :whitespace do
task :retab do
sh %{find . -name '*.rb' -exec sed -i '' 's/\t/ /g' {} \\;}
end
desc 'Remove consecutive blank lines'
task :scrub_gratuitous_newlines do
sh %{find . -name '*.rb' -exec sed -i '' '/./,/^$/!d' {} \\;}
end
end