From: Uwe Stöhr Date: Wed, 3 Oct 2007 00:09:47 +0000 (+0000) Subject: lyx_1_6.py: fix endless loop, but routine is still not working, see http://www.mail... X-Git-Tag: 1.6.10~8066 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=612504b796feef1a2f564bbefb4c68cc93bc5be3;p=features.git 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 --- 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