]> git.lyx.org Git - features.git/commitdiff
lyx2lyx: fix index reversion
authorJuergen Spitzmueller <spitz@lyx.org>
Wed, 2 Nov 2022 08:33:09 +0000 (09:33 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Wed, 2 Nov 2022 08:33:09 +0000 (09:33 +0100)
This was only a warning, but it made the tests fail

lib/lyx2lyx/lyx_2_4.py

index e4fe3f97ac3de24f823e2f1773d1b5e31e746f2c..43b7ce31248d6478aa1a8489a0aca853edd9c679 100644 (file)
@@ -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)