From e4558862bac35a0cecac41817a5d4982b4ba4ef1 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Wed, 3 Oct 2007 00:37:08 +0000 Subject: [PATCH] Stupid mistake. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20678 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/lyx2lyx/lyx_1_6.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/lyx2lyx/lyx_1_6.py b/lib/lyx2lyx/lyx_1_6.py index f705054470..031f1cdc16 100644 --- a/lib/lyx2lyx/lyx_1_6.py +++ b/lib/lyx2lyx/lyx_1_6.py @@ -308,12 +308,14 @@ def revert_inset_command(document): i = 0 while 1: i = find_token(document.body, "\\begin_inset CommandInset", i) + if i == -1: + return nextline = document.body[i+1] r = re.compile(r'LatexCommand\s+(.*)$') m = r.match(nextline) if not m: document.warning("Malformed LyX document: Missing LatexCommand in " + document.body[i] + ".") - return + continue cmdName = m.group(1) insertion = ["\\begin_inset LatexCommand " + cmdName] document.body[i : i+2] = insertion -- 2.39.5