gedit-trailsave icon indicating copy to clipboard operation
gedit-trailsave copied to clipboard

Doesn't work with CRLF (Windows) or CR (Mac OS Classic) line endings

Open ghost opened this issue 13 years ago • 2 comments

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.

ghost avatar Nov 22 '11 11:11 ghost

Please merge this commit! it is a must!

brunobraga avatar Jun 27 '13 00:06 brunobraga

The fix indeed is a must have, though I'd prefer a different approach, i.e. to extend the regex expression.

drahnr avatar Dec 01 '13 23:12 drahnr