delete trailing whitespace before save