commit b468402176f26cfadd768cd1d46513ce99bcf6a0
Author: Juergen Spitzmueller <[email protected]>
Date:   Mon Jun 1 09:54:38 2026 +0200

    Amend c962f7b8708f
---
 src/FontInfo.cpp           | 16 ++++++++++------
 src/insets/InsetLayout.cpp | 11 +++++++----
 2 files changed, 17 insertions(+), 10 deletions(-)

diff --git a/src/FontInfo.cpp b/src/FontInfo.cpp
index 3dd396a516..85dace8a24 100644
--- a/src/FontInfo.cpp
+++ b/src/FontInfo.cpp
@@ -823,12 +823,16 @@ FontInfo lyxRead(Lexer & lex, FontInfo const & fi)
                        }
                } else if (tok == "color") {
                        lex.eatLine();
-                       vector<string> const colors = 
getVectorFromString(lex.getString(), " ");
-                       string const lmcolor = colors.front();
-                       string dmcolor;
-                       if (colors.size() > 1)
-                               dmcolor = colors.back();
-                       setLyXColor(lmcolor, f, dmcolor);
+                       string const val = lex.getString(true);
+                       if (contains(val, " ")) {
+                               vector<string> const colors = 
getVectorFromString(val, " ");
+                               string const lmcolor = colors.front();
+                               string dmcolor;
+                               if (colors.size() > 1)
+                                       dmcolor = colors.back();
+                               setLyXColor(lmcolor, f, dmcolor);
+                       } else
+                               setLyXColor(val, f);
                } else {
                        lex.printError("Unknown tag");
                        error = true;
diff --git a/src/insets/InsetLayout.cpp b/src/insets/InsetLayout.cpp
index 7acaa3d3f8..7bd75d21b1 100644
--- a/src/insets/InsetLayout.cpp
+++ b/src/insets/InsetLayout.cpp
@@ -534,11 +534,14 @@ bool InsetLayout::read(Lexer & lex, TextClass const & 
tclass,
                        break;
                case IL_BGCOLOR: {
                        lex.eatLine();
-                       vector<string> const colors = 
getVectorFromString(lex.getString(), " ");
-                       string const lmcolor = colors.front();
+                       string lmcolor = lex.getString(true);
                        string dmcolor;
-                       if (colors.size() > 1)
-                               dmcolor = colors.back();
+                       if (contains(lmcolor, " ")) {
+                               vector<string> const colors = 
getVectorFromString(lmcolor, " ");
+                               lmcolor = colors.front();
+                               if (colors.size() > 1)
+                                       dmcolor = colors.back();
+                       }
                        if (dmcolor.empty()) {
                                bgcolor_ = lcolor.getFromLyXName(lmcolor);
                                break;
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to