mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-05 13:26:21 +00:00
Distinguish between empty argument and no argument
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40141 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
93d6ce915f
commit
491bad7b00
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user