From 2a525e45bd0dc7976d4dd1cda44cc8867b178fd5 Mon Sep 17 00:00:00 2001 From: Dekel Tsur Date: Tue, 1 Oct 2002 08:21:47 +0000 Subject: [PATCH] Fix the \end_deeper bug. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5353 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/lyx2lyx/lyxconvert_218.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/lyx2lyx/lyxconvert_218.py b/lib/lyx2lyx/lyxconvert_218.py index 794cab76b3..df3e884bc3 100644 --- a/lib/lyx2lyx/lyxconvert_218.py +++ b/lib/lyx2lyx/lyxconvert_218.py @@ -189,7 +189,7 @@ def remove_oldminipage(lines): def is_empty(lines): return filter(is_nonempty_line, lines) == [] -font_rexp = re.compile(r"\\(family|series|shape|size|emph|numeric|bar|noun)") +move_rexp = re.compile(r"\\(family|series|shape|size|emph|numeric|bar|noun|end_deeper)") ert_rexp = re.compile(r"\\begin_inset|.*\\SpecialChar") spchar_rexp = re.compile(r"(.*)(\\SpecialChar.*)") ert_begin = ["\\begin_inset ERT", @@ -240,7 +240,8 @@ def remove_oldert(lines): tmp = [] for line in lines[k:k2]: - if font_rexp.match(line): + # Move some lines outside the ERT inset: + if move_rexp.match(line): if new2 == []: # This is not necessary, but we want the output to be # as similar as posible to the lyx format @@ -286,6 +287,7 @@ def remove_oldert(lines): lines[i:j+1] = new i = i+1 + # Delete remaining "\latex xxx" tokens i = 0 while 1: i = find_token(lines, "\\latex ", i)