Strip trailing whitespace automatically