From: Dekel Tsur Date: Wed, 9 Oct 2002 20:36:25 +0000 (+0000) Subject: Small fix X-Git-Tag: 1.6.10~18203 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=9daf926c0277e3939328cde7fdac151885a150a0;p=features.git Small fix git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5376 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/lib/ChangeLog b/lib/ChangeLog index 0c84fd64fc..e52e4a01d2 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,8 @@ +2002-10-09 Dekel Tsur + + * lyx2lyx/lyxconvert_218.py: Combine ert insets only when they are + in the Standard layout. + 2002-10-05 Dekel Tsur * lyx2lyx/lyxconvert_218.py (fix_oldfloatinset): Search for diff --git a/lib/lyx2lyx/lyxconvert_218.py b/lib/lyx2lyx/lyxconvert_218.py index eb1428cc39..d94de6f4c8 100644 --- a/lib/lyx2lyx/lyxconvert_218.py +++ b/lib/lyx2lyx/lyxconvert_218.py @@ -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):