Fix earlier mistake.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36057 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2010-11-04 14:23:47 +00:00
parent 2ad71f22ce
commit adedac675b

View File

@ -1207,10 +1207,13 @@ def revert_mhchem(document):
i = 0 i = 0
while True: while True:
i = find_token(document.body, "\\begin_inset Formula", i) i = find_token(document.body, "\\begin_inset Formula", i)
if i == -1:
break
line = document.body[i] 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" mhchem = "on"
break break
i += 1
if mhchem == "on": if mhchem == "on":
pre = ["% lyx2lyx mhchem commands", pre = ["% lyx2lyx mhchem commands",