WIP - Bugfix for trailing whitespace on a line with no code

Not sure how to implement the fix.