Trim spurious white space at the end of lines