commit dfab2898de3a63f7ccb0144098846fda7008ebd7
Author: Juergen Spitzmueller <sp...@lyx.org>
Date:   Fri Jul 21 09:46:47 2023 +0200

    Fix lyx2lyx reversion problem for covington examples
    
    Do not take arguments of nested insets/layouts as your own
---
 lib/lyx2lyx/lyx_2_4.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/lib/lyx2lyx/lyx_2_4.py b/lib/lyx2lyx/lyx_2_4.py
index 33bf92c..6e4bdbb 100644
--- a/lib/lyx2lyx/lyx_2_4.py
+++ b/lib/lyx2lyx/lyx_2_4.py
@@ -5296,6 +5296,9 @@ def revert_exarg2(document):
                      continue
 
             arg = find_token(document.body, "\\begin_inset Argument 1", i, l)
+            if arg != -1 and layouttype != "\\begin_layout " + 
get_containing_layout(document.body, arg)[0]:
+                 # this is not our argument!
+                 arg = -1
             if subexpl or arg == -1:
                 iarg = find_token(document.body, "\\begin_inset Argument 
item:1", i, l)
                 if iarg == -1:
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to