[LyX/master] Fix lyx2lyx conversion roundtrip problem
Koji Yokota <[email protected]> Tue, 04 Aug 2026 06:00:55 +0000
| Newsgroups | gmane.editors.lyx.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit 7b10e9a6e68086785cd0b4551a9d93c272c5e3fd Author: Koji Yokota <[email protected]> Date: Tue Aug 4 14:56:48 2026 +0900 Fix lyx2lyx conversion roundtrip problem https://lists.lyx.org/pipermail/lyx-devel/2026-August/017067.html Thanks to Pavel and Scott. --- lib/lyx2lyx/lyx_2_6.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/lyx2lyx/lyx_2_6.py b/lib/lyx2lyx/lyx_2_6.py index 9c2eb4c634..7302e78b02 100644 --- a/lib/lyx2lyx/lyx_2_6.py +++ b/lib/lyx2lyx/lyx_2_6.py @@ -47,7 +47,6 @@ from lyx2lyx_tools import ( # del_value, # find_complete_lines, # find_end_of, -# find_token_exact, # find_tokens, # get_option_value, # set_bool_value, @@ -61,6 +60,7 @@ from parser_tools import ( find_substring, find_token, find_token_backwards, + find_token_exact, get_bool_value, get_containing_inset, get_containing_layout, @@ -1570,7 +1570,7 @@ def revert_hex32colors(document): """Revert 32bit ARGB hex colors to 16bit RGB""" i = 0 while True: - i = find_token(document.header, "\\color", i + 1) + i = find_token_exact(document.header, "\\color", i + 1) if i == -1: break cn = get_quoted_value(document.header, "\\color", i, i + 1) @@ -1590,7 +1590,7 @@ def revert_hex32colors(document): i = 0 while True: - i = find_token(document.body, "\\color", i + 1) + i = find_token_exact(document.body, "\\color", i + 1) if i == -1: return cn = get_quoted_value(document.body, "\\color", i, i + 1) -- lyx-cvs mailing list [email protected] https://lists.lyx.org/mailman/listinfo/lyx-cvs