]> git.lyx.org Git - lyx.git/commitdiff
Small fix
authorDekel Tsur <dekelts@tau.ac.il>
Wed, 9 Oct 2002 20:36:25 +0000 (20:36 +0000)
committerDekel Tsur <dekelts@tau.ac.il>
Wed, 9 Oct 2002 20:36:25 +0000 (20:36 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5376 a592a061-630c-0410-9148-cb99ea01b6c8

lib/ChangeLog
lib/lyx2lyx/lyxconvert_218.py

index 0c84fd64fcf8e43321be326320df2c60c4cd5f57..e52e4a01d2b0292e561f5fbe5d77771a831652a0 100644 (file)
@@ -1,3 +1,8 @@
+2002-10-09  Dekel Tsur  <dekelts@tau.ac.il>
+
+       * lyx2lyx/lyxconvert_218.py: Combine ert insets only when they are
+       in the Standard layout.
+
 2002-10-05  Dekel Tsur  <dekelts@tau.ac.il>
 
        * lyx2lyx/lyxconvert_218.py (fix_oldfloatinset): Search for 
index eb1428cc39dfcd2a72a78215951f52380b6ac9f1..d94de6f4c8edf35f2586a2bdb54c2eeda5f9d680 100644 (file)
@@ -320,9 +320,13 @@ def remove_oldertinset(lines):
        i = i+1
 
 def is_ert_paragraph(lines, i):
+    if not check_token(lines[i], "\\layout Standard"):
+        return 0
+
     i = find_nonempty_line(lines, i+1)
     if not check_token(lines[i], "\\begin_inset ERT"):
        return 0
+
     j = find_end_of_inset(lines, i)
     k = find_nonempty_line(lines, j+1)
     return check_token(lines[k], "\\layout")
@@ -333,7 +337,7 @@ def combine_ert(lines):
        i = find_token(lines, "\\begin_inset ERT", i)
        if i == -1:
            break
-       j = find_token_backwards(lines,"\\layout", i-1)
+       j = get_paragraph(lines, i)
        count = 0
        text = []
        while is_ert_paragraph(lines, j):