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