[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lyx-cvs
Subject:    [LyX/master] Fix the fix
From:       Georg Baum <baum () lyx ! org>
Date:       2014-05-29 12:45:13
Message-ID: 20140529124513.EB25B2802B6 () lyx ! lyx ! org
[Download RAW message or body]

commit 55af9cb006563032e35fcc8bc5c8c1284c0344da
Author: Georg Baum <baum@lyx.org>
Date:   Thu May 29 14:44:38 2014 +0200

    Fix the fix
    
    MAC-style (pre-OS X) line ends were not recognized anymore

diff --git a/lib/lyx2lyx/LyX.py b/lib/lyx2lyx/LyX.py
index 93006c3..5ee8d5f 100644
--- a/lib/lyx2lyx/LyX.py
+++ b/lib/lyx2lyx/LyX.py
@@ -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':

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic