trim trailing whitespaces on save