]> git.lyx.org Git - lyx.git/commitdiff
fix lyx2lyx functions
authorJuergen Spitzmueller <spitz@lyx.org>
Sat, 17 Aug 2024 14:19:10 +0000 (16:19 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Sat, 17 Aug 2024 14:19:10 +0000 (16:19 +0200)
lib/lyx2lyx/lyx_2_5.py

index 193455227e2b1acd9f177eddf59d9a934c0fe846..c93a3bfc215734a1be5cd9ad7784c89c6fa0ff05 100644 (file)
@@ -653,7 +653,8 @@ def convert_index_sc(document):
                 k = find_substring(document.body, ec, k, j)
                 if k == -1:
                     break
-                if get_containing_inset(document.body, k)[0] == "ERT":
+                inInset = get_containing_inset(document.body, k)
+                if inInset and inInset[0] == "ERT":
                     k += 1
                     continue
                     
@@ -696,7 +697,8 @@ def revert_index_sc(document):
                 k = find_substring(document.body, ec, k, j)
                 if k == -1:
                     break
-                if get_containing_inset(document.body, k)[0] == "ERT":
+                inInset = get_containing_inset(document.body, k)
+                if inInset and inInset[0] == "ERT":
                     k += 1
                     continue