commit 886d881ba3366f07f0e9ace3ae91abc78b500192
Author: Juergen Spitzmueller <[email protected]>
Date:   Wed Nov 2 09:33:09 2022 +0100

    lyx2lyx: fix index reversion
    
    This was only a warning, but it made the tests fail
---
 lib/lyx2lyx/lyx_2_4.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/lib/lyx2lyx/lyx_2_4.py b/lib/lyx2lyx/lyx_2_4.py
index e4fe3f9..43b7ce3 100644
--- a/lib/lyx2lyx/lyx_2_4.py
+++ b/lib/lyx2lyx/lyx_2_4.py
@@ -4434,7 +4434,8 @@ def revert_index_macros(document):
 
     i = 0
     while True:
-        i = find_token(document.body, '\\begin_inset Index', i+1)
+        # trailing blank needed here to exclude IndexMacro insets
+        i = find_token(document.body, '\\begin_inset Index ', i+1)
         if i == -1:
             break
         j = find_end_of_inset(document.body, i)
-- 
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to