Fix the fix

MAC-style (pre-OS X) line ends were not recognized anymore
This commit is contained in:
Georg Baum 2014-05-29 14:44:38 +02:00
parent 20bcaec061
commit 55af9cb006

View File

@ -147,7 +147,7 @@ def get_backend(textclass):
def trim_eol(line):
" Remove end of line char(s)."
if line[-1] != '\n':
if line[-1] != '\n' and line[-1] != '\r':
# May happen for the last line of a document
return line
if line[-2:-1] == '\r':