Trim trailing space from lines.