]> git.lyx.org Git - lyx.git/commitdiff
Fix conversion of notes.
authorDekel Tsur <dekelts@tau.ac.il>
Thu, 13 Mar 2003 12:04:31 +0000 (12:04 +0000)
committerDekel Tsur <dekelts@tau.ac.il>
Thu, 13 Mar 2003 12:04:31 +0000 (12:04 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6485 a592a061-630c-0410-9148-cb99ea01b6c8

lib/lyx2lyx/lyxconvert_218.py

index 882488d4bf318787ef16d3a9073569c708b396ce..3f0c45e8bf38ad13cc3502b12d55c6b4760ab2bb 100644 (file)
@@ -485,14 +485,17 @@ def change_infoinset(lines):
             break
         txt = string.lstrip(lines[i][18:])
         new = ["\\begin_inset Note", "collapsed true", ""]
-        if len(txt) > 0:
-            new = new + ["\layout Standard", "", txt]
         j = find_token(lines, "\\end_inset", i)
         if j == -1:
             break
-        for k in range(i+1, j):
+
+        note_lines = lines[i+1:j]
+        if len(txt) > 0:
+            note_lines = [txt]+note_lines
+
+        for line in note_lines:
             new = new + ["\layout Standard", ""]
-            tmp = string.split(lines[k], '\\')
+            tmp = string.split(line, '\\')
             new = new + [tmp[0]]
             for x in tmp[1:]:
                 new = new + ["\\backslash ", x]