From 612504b796feef1a2f564bbefb4c68cc93bc5be3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20St=C3=B6hr?= Date: Wed, 3 Oct 2007 00:09:47 +0000 Subject: [PATCH] lyx_1_6.py: fix endless loop, but routine is still not working, see http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg128426.html git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20677 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 3558686cb2..f705054470 100644 --- a/lib/lyx2lyx/lyx_1_6.py +++ b/lib/lyx2lyx/lyx_1_6.py @@ -303,6 +303,8 @@ def revert_inset_command(document): Some insets may end up being converted to insets earlier versions of LyX will not be able to recognize. Not sure what to do about that. """ + # FIXME, this routine doesn't work, must be fixed before LyX 1.6.0, see + # http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg128426.html i = 0 while 1: i = find_token(document.body, "\\begin_inset CommandInset", i) @@ -311,7 +313,7 @@ def revert_inset_command(document): m = r.match(nextline) if not m: document.warning("Malformed LyX document: Missing LatexCommand in " + document.body[i] + ".") - continue + return cmdName = m.group(1) insertion = ["\\begin_inset LatexCommand " + cmdName] document.body[i : i+2] = insertion -- 2.39.2