]> git.lyx.org Git - lyx.git/commitdiff
* lyx2lyx/lyx_1_6.py:
authorJürgen Spitzmüller <spitz@lyx.org>
Sun, 12 Oct 2008 08:58:42 +0000 (08:58 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Sun, 12 Oct 2008 08:58:42 +0000 (08:58 +0000)
- fix conversion of empty index insets.

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

lib/lyx2lyx/lyx_1_6.py

index d87d84d18f639f8fe2a3660629f94590d392d26b..87d0d4b4a41822f53d9891b53667ee09a5f0612e 100644 (file)
@@ -1071,10 +1071,11 @@ def convert_latexcommand_index(document):
         m = r1.match(document.body[i + 2])
         if m == None:
             document.warning("Unable to match: " + document.body[i+2])
         m = r1.match(document.body[i + 2])
         if m == None:
             document.warning("Unable to match: " + document.body[i+2])
-            i += 1
-            continue
-        fullcontent = m.group(1)
-        linelist = latex2lyx(fullcontent)
+            # this can happen with empty index insets!
+            linelist = [""]
+        else:
+            fullcontent = m.group(1)
+            linelist = latex2lyx(fullcontent)
         #document.warning(fullcontent)
 
         linelist = ["\\begin_inset Index", "status collapsed", "\\begin_layout Standard", ""] + \
         #document.warning(fullcontent)
 
         linelist = ["\\begin_inset Index", "status collapsed", "\\begin_layout Standard", ""] + \