]> git.lyx.org Git - features.git/commitdiff
Fix earlier mistake.
authorRichard Heck <rgheck@comcast.net>
Thu, 4 Nov 2010 14:23:47 +0000 (14:23 +0000)
committerRichard Heck <rgheck@comcast.net>
Thu, 4 Nov 2010 14:23:47 +0000 (14:23 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36057 a592a061-630c-0410-9148-cb99ea01b6c8

lib/lyx2lyx/lyx_2_0.py

index 33aba904878127dcc9844d87498e6ff095f8234c..27c4415c38b52892b7c34ca6fc7e8f4ed74914aa 100644 (file)
@@ -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",