Apply formatting to strip trailing whitespace