commit de04f3270efc8d30431dffb245f976974af5720a
Author: Jürgen Spitzmüller <[email protected]>
Date: Tue Mar 5 15:41:21 2024 +0100
Fix lyx2lyx bug with nested inset arguments
---
lib/lyx2lyx/lyx_2_4.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/lyx2lyx/lyx_2_4.py b/lib/lyx2lyx/lyx_2_4.py
index 687c3fbfbd..baa214c9a7 100644
--- a/lib/lyx2lyx/lyx_2_4.py
+++ b/lib/lyx2lyx/lyx_2_4.py
@@ -30,11 +30,11 @@ from parser_tools import (count_pars_in_inset,
del_complete_lines, del_token,
find_end_of, find_end_of_inset, find_end_of_layout, find_token,
find_token_backwards, find_token_exact, find_re, get_bool_value,
get_containing_inset, get_containing_layout, get_option_value, get_value,
- get_quoted_value)
+ get_quoted_value, is_in_inset)
# del_value,
# find_complete_lines,
# find_re, find_substring,
-# is_in_inset, set_bool_value
+# set_bool_value
# find_tokens, check_token
from lyx2lyx_tools import (put_cmd_in_ert, add_to_preamble,
insert_to_preamble, lyx2latex,
@@ -1649,8 +1649,8 @@ def convert_hebrew_parentheses(document):
continue
elif line.startswith('\\end_inset'):
if inset_is_arg:
- inset_is_arg = False
- else:
+ inset_is_arg = is_in_inset(document.body, i, "\\begin_inset
Argument")[0] != -1
+ else:
current_insets.pop()
elif current_languages[-1] == 'hebrew' and not line.startswith('\\'):
document.body[i] =
line.replace('(','\x00').replace(')','(').replace('\x00',')')
--
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs