[LyX/master] consider default language in revert_numeric
Udi Fogiel <[email protected]> Tue, 04 Aug 2026 16:43:16 +0000
| Newsgroups | gmane.editors.lyx.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit c5d4c572ae6c7ee99105a2008b9e368aa68a8990 Author: Udi Fogiel <[email protected]> Date: Tue Aug 4 19:43:08 2026 +0300 consider default language in revert_numeric --- lib/lyx2lyx/lyx_2_6.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/lyx2lyx/lyx_2_6.py b/lib/lyx2lyx/lyx_2_6.py index db3af39caf..a1e0171b50 100644 --- a/lib/lyx2lyx/lyx_2_6.py +++ b/lib/lyx2lyx/lyx_2_6.py @@ -1005,12 +1005,14 @@ def revert_numeric(document): the regex itself. Merges consecutive plain-content lines before matching, since Paragraph::write() soft-wraps long runs (column > 500) with a bare newline that isn't a real boundary.""" - rtl = False + default_rtl = get_value(document.header, "\\language") in rtl_languages_numeric + rtl = default_rtl at_word_start = True i = 0 while i < len(document.body): line = document.body[i] if line.startswith("\\begin_layout"): + rtl = default_rtl at_word_start = True i += 1 continue -- lyx-cvs mailing list [email protected] https://lists.lyx.org/mailman/listinfo/lyx-cvs