]> git.lyx.org Git - features.git/commitdiff
Stupid mistake.
authorRichard Heck <rgheck@comcast.net>
Wed, 3 Oct 2007 00:37:08 +0000 (00:37 +0000)
committerRichard Heck <rgheck@comcast.net>
Wed, 3 Oct 2007 00:37:08 +0000 (00:37 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20678 a592a061-630c-0410-9148-cb99ea01b6c8

lib/lyx2lyx/lyx_1_6.py

index f7050544703d009a09aae05c4a236d40a4b64197..031f1cdc16cc133a02a492bfd67ff4c3052ca00f 100644 (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