[LyX/master] Fix prefs2prefs for \\set_color
Juergen Spitzmueller
spitz at lyx.org
Tue Dec 15 07:45:24 UTC 2020
commit 2ac48f2c5b4619cfc1be11a8769c3af4f86b5dbc
Author: Juergen Spitzmueller <spitz at lyx.org>
Date: Tue Dec 15 09:15:23 2020 +0100
Fix prefs2prefs for \\set_color
---
lib/scripts/prefs2prefs_prefs.py | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/lib/scripts/prefs2prefs_prefs.py b/lib/scripts/prefs2prefs_prefs.py
index 88b0041..61c93d0 100644
--- a/lib/scripts/prefs2prefs_prefs.py
+++ b/lib/scripts/prefs2prefs_prefs.py
@@ -455,6 +455,16 @@ def rename_cyrillic_kmap_files(line):
line = line.replace('"koi8-u"', '"ukrainian"')
return (True, 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)
+ m = colre.match(line)
+ if not m:
+ return no_match
+ line += " " + m.group(2) + '"'
+ return (True, line)
+
# End conversions for LyX 2.3 to 2.4
####################################
@@ -504,5 +514,5 @@ conversions = [
[ 32, []],
[ 33, []],
[ 34, [rename_cyrillic_kmap_files]],
- [ 35, []]
+ [ 35, [add_dark_color]]
]
More information about the lyx-cvs
mailing list