]> git.lyx.org Git - features.git/commitdiff
Fix mchem routine: Typo.
authorRichard Heck <rgheck@comcast.net>
Thu, 4 Nov 2010 21:47:47 +0000 (21:47 +0000)
committerRichard Heck <rgheck@comcast.net>
Thu, 4 Nov 2010 21:47:47 +0000 (21:47 +0000)
Fix dots routine: Get value, then delete.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36094 a592a061-630c-0410-9148-cb99ea01b6c8

lib/lyx2lyx/lyx_2_0.py

index 45c8c57d4fabb9a47732e84b5c75e4e1ac51d1e5..25d3ca397c366239d04583fa4e386be8666e963f 100644 (file)
@@ -833,6 +833,10 @@ def revert_mhchem(document):
             mhchem = "on"
         del document.header[i]
 
+    if mhchem == "off":
+      # don't load case
+      return 
+
     if mhchem == "auto":
         i = 0
         while True:
@@ -840,7 +844,7 @@ def revert_mhchem(document):
             if i == -1:
                break
             line = document.body[i]
-            if line.find("\\ce{") != -1 or line.find("\\cf{") != 1:
+            if line.find("\\ce{") != -1 or line.find("\\cf{") != -1:
               mhchem = "on"
               break
             i += 1
@@ -1772,8 +1776,8 @@ def revert_mathdots(document):
     if mathdots == -1:
       document.warning("No \\usemathdots line. Assuming auto.")
     else:
-      del document.header[mathdots]
       val = get_value(document.header, "\\use_mathdots", mathdots)
+      del document.header[mathdots]
       try:
         usedots = int(val)
       except: