From adedac675b11b86a04503c523343744bc4cc488a Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Thu, 4 Nov 2010 14:23:47 +0000 Subject: [PATCH] Fix earlier mistake. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36057 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/lyx2lyx/lyx_2_0.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/lyx2lyx/lyx_2_0.py b/lib/lyx2lyx/lyx_2_0.py index 33aba90487..27c4415c38 100644 --- a/lib/lyx2lyx/lyx_2_0.py +++ b/lib/lyx2lyx/lyx_2_0.py @@ -1207,10 +1207,13 @@ def revert_mhchem(document): i = 0 while True: i = find_token(document.body, "\\begin_inset Formula", i) + if i == -1: + break line = document.body[i] if line.find("\\ce{") != -1 or line.find("\\cf{") != 1: mhchem = "on" break + i += 1 if mhchem == "on": pre = ["% lyx2lyx mhchem commands",