From: Juergen Spitzmueller Date: Sat, 17 Aug 2024 14:19:10 +0000 (+0200) Subject: fix lyx2lyx functions X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=01f5efbe13052ac5d0f082a77d888f20b0fdc39e;p=lyx.git fix lyx2lyx functions --- diff --git a/lib/lyx2lyx/lyx_2_5.py b/lib/lyx2lyx/lyx_2_5.py index 193455227e..c93a3bfc21 100644 --- a/lib/lyx2lyx/lyx_2_5.py +++ b/lib/lyx2lyx/lyx_2_5.py @@ -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