commit 6a37a67b46506bf1402ace55c2016a659f0d2999 Author: Kornel Benko <kor...@lyx.org> Date: Tue Dec 15 12:54:04 2020 +0100
Small improvement to 2ac48f2c. Making the regex little more robust. --- lib/scripts/prefs2prefs_prefs.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/scripts/prefs2prefs_prefs.py b/lib/scripts/prefs2prefs_prefs.py index 61c93d0..d3a70d2 100644 --- a/lib/scripts/prefs2prefs_prefs.py +++ b/lib/scripts/prefs2prefs_prefs.py @@ -458,11 +458,11 @@ def rename_cyrillic_kmap_files(line): def add_dark_color(line): if not line.lower().startswith("\\set_color "): return no_match - colre = re.compile(r'^\\set_color\s+(.*)\s+(.*)"', re.IGNORECASE) + colre = re.compile(r'^\\set_color\s+("[^"]+")\s+("[^"]+")\s*$', re.IGNORECASE) m = colre.match(line) if not m: return no_match - line += " " + m.group(2) + '"' + line += " " + m.group(2) return (True, line) # End conversions for LyX 2.3 to 2.4 -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs