Interesting!  Why is your editor appending a space at the end of the line?   Can you configure it to never leave trailing spaces on any line?