Stupid mistake.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20678 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2007-10-03 00:37:08 +00:00
parent 612504b796
commit e4558862ba

View File

@ -308,12 +308,14 @@ def revert_inset_command(document):
i = 0
while 1:
i = find_token(document.body, "\\begin_inset CommandInset", i)
if i == -1:
return
nextline = document.body[i+1]
r = re.compile(r'LatexCommand\s+(.*)$')
m = r.match(nextline)
if not m:
document.warning("Malformed LyX document: Missing LatexCommand in " + document.body[i] + ".")
return
continue
cmdName = m.group(1)
insertion = ["\\begin_inset LatexCommand " + cmdName]
document.body[i : i+2] = insertion