Skip to content

Commit

Permalink
Space columns removal: properly handle blank lines
Browse files Browse the repository at this point in the history
  • Loading branch information
Joaquin Caraballo committed Oct 6, 2012
1 parent 2bacaa5 commit af50bef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion insert_snippets.bash
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ PRETTY_BASE_URL=https://github.com/emanchado/camino-mejor-programador-codigo/blo
function normalise() {
snippet=`cat`

while [[ `echo "$snippet" | wc -l` == `echo "$snippet" | grep '^ ' | wc -l` ]]; do
while [[ `echo "$snippet" | grep -v '^ ' | grep -v '^$' | wc -l` == "0" ]]; do
snippet=`echo "$snippet" | sed 's/^ //'`
done

Expand Down

0 comments on commit af50bef

Please sign in to comment.