removes trailing whitespace from comments