gedit-trailsave
gedit-trailsave copied to clipboard
Doesn't work with CRLF (Windows) or CR (Mac OS Classic) line endings
With files that use Windows or Mac OS Classic line endings, trailsave doesn't work at all. The trailing space regex doesn't work with non-Unix line endings since "$" only matches "\n".
I've written a patch that converts all the line endings to Unix with replace() before the regex gets to it. Not sure if that's the best way to go about it, but it's easy and it works.
Please merge this commit! it is a must!
The fix indeed is a must have, though I'd prefer a different approach, i.e. to extend the regex expression.