]> git.lyx.org Git - features.git/commitdiff
lyx_1_5.py: last part of fix for bug 3313
authorUwe Stöhr <uwestoehr@web.de>
Wed, 27 Jun 2007 20:46:04 +0000 (20:46 +0000)
committerUwe Stöhr <uwestoehr@web.de>
Wed, 27 Jun 2007 20:46:04 +0000 (20:46 +0000)
OK from José: http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg121628.html

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18918 a592a061-630c-0410-9148-cb99ea01b6c8

lib/lyx2lyx/lyx_1_5.py

index d934d80e9abc5397512423fbafeb4a55133e46a0..7463f230aea7238b26d19a58861e8b74c45872d4 100644 (file)
@@ -1847,16 +1847,18 @@ Forced output is currently not enforced'''
     spec_chars = {}
     for line in fp.readlines():
         if line[0] != '#':
-            line=line.replace('"','') #remove all qoutation marks
+            line=line.replace(' "',' ') # remove all qoutation marks with spaces before
+            line=line.replace('" ',' ') # remove all qoutation marks with spaces after
+            line=line.replace(r'\"','"') # replace \" by " (for characters with diaresis)
             try:
                 # flag1 and flag2 are preamble & flags
-                # currently NOT impemented
+                # currently NOT implemented
                 [ucs4,command,flag1,flag2] =line.split(None,3)
                 spec_chars[unichr(eval(ucs4))] = [command, flag1, flag2]
             except:
                 pass
     fp.close()
-    #Define strings to start and end ERT and math insets
+    # Define strings to start and end ERT and math insets
     ert_intro='\n\n\\begin_inset ERT\nstatus collapsed\n\\begin_layout Standard\n\\backslash\n'
     ert_outro='\n\\end_layout\n\n\\end_inset\n\n'
     math_intro='\n\\begin_inset Formula $'
@@ -2003,4 +2005,3 @@ if __name__ == "__main__":
     pass
 
 
-