Author: baum
Date: Sun Nov  6 18:32:15 2011
New Revision: 40141
URL: http://www.lyx.org/trac/changeset/40141

Log:
Distinguish between empty argument and no argument

Modified:
   lyx-devel/trunk/src/tex2lyx/Preamble.cpp

Modified: lyx-devel/trunk/src/tex2lyx/Preamble.cpp
==============================================================================
--- lyx-devel/trunk/src/tex2lyx/Preamble.cpp    Sun Nov  6 18:16:54 2011        
(r40140)
+++ lyx-devel/trunk/src/tex2lyx/Preamble.cpp    Sun Nov  6 18:32:15 2011        
(r40141)
@@ -1035,7 +1035,7 @@
 
                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 @@
                        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

Reply via email to