From 9d87888cf5caaf4dde469849610950b5db30d8a3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Matox?= Date: Wed, 18 Aug 2004 13:48:33 +0000 Subject: [PATCH] fix bug where \end_layout was showing after \end_deeper unconditionally git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8954 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/lyx2lyx/ChangeLog | 5 +++++ lib/lyx2lyx/lyx_1_4.py | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/lib/lyx2lyx/ChangeLog b/lib/lyx2lyx/ChangeLog index 3fea8f6bb9..1580dfa6b0 100644 --- a/lib/lyx2lyx/ChangeLog +++ b/lib/lyx2lyx/ChangeLog @@ -1,3 +1,8 @@ +2004-08-19 José Matos + + * lyx_1_4.lyx (add_end_layout): fix \end_layout interaction with + \end_deeper. + 2004-08-16 José Matos * lyx_1_4.lyx (convert_comment, convert_breaks, convert_frameless_box): diff --git a/lib/lyx2lyx/lyx_1_4.py b/lib/lyx2lyx/lyx_1_4.py index 97eab4dea2..ca2d30ea1c 100644 --- a/lib/lyx2lyx/lyx_1_4.py +++ b/lib/lyx2lyx/lyx_1_4.py @@ -211,7 +211,7 @@ def convert_comment(lines): #but if this happens deal with it greacefully adding #the missing \end_deeper. i = len(lines) - 1 - lines[i:i] = ["\end_deeper","","","\\end_inset","",""] + lines[i:i] = ["\end_deeper",""] return else: del lines[i] @@ -304,11 +304,11 @@ def add_end_layout(lines): continue if token == "\\end_deeper": - lines.insert(i,"") - lines.insert(i,"\\end_layout") - i = i + 3 - while struct_stack[-1] != "\\begin_deeper": + if struct_stack[-1] == '\\layout': + lines.insert(i, '\\end_layout') + i = i + 1 struct_stack.pop() + i = i + 1 continue #case \end_document -- 2.39.2