]> git.lyx.org Git - lyx.git/blobdiff - src/tex2lyx/Preamble.cpp
Fix "stray '}' in text" warnings: When parsing with FLAG_ITEM the braces need
[lyx.git] / src / tex2lyx / Preamble.cpp
index f7f219281d0805580d8d4c439f3160365abf5a8a..c0b3cb9ac4cc9e81d54b889f10a42c6a6ec3cb14 100644 (file)
@@ -1035,7 +1035,7 @@ void Preamble::parse(Parser & p, string const & forceclass,
 
                else if (t.cs() == "color") {
                        string const space =
-                               (p.hasOpt() ? p.getArg('[', ']') : string());
+                               (p.hasOpt() ? p.getOpt() : string());
                        string argument = p.getArg('{', '}');
                        // check the case that a standard color is used
                        if (space.empty() && is_known(argument, known_basic_colors)) {
@@ -1048,7 +1048,7 @@ void Preamble::parse(Parser & p, string const & forceclass,
                        else {
                                h_preamble << t.asInput();
                                if (!space.empty())
-                                       h_preamble << '[' << space << ']';
+                                       h_preamble << space;
                                h_preamble << '{' << argument << '}';
                                // the color might already be set because \definecolor
                                // is parsed before this