mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Parser
- ::findAttribute now tolerates missing values, as it should if I'd written it properly in the first place.
This commit is contained in:
parent
2da3258dd0
commit
5b8aef5463
1 changed files with 6 additions and 2 deletions
|
@ -803,7 +803,8 @@ void Parser::findAttribute ()
|
||||||
std::string value;
|
std::string value;
|
||||||
if (n.getQuoted ('"', value) ||
|
if (n.getQuoted ('"', value) ||
|
||||||
n.getQuoted ('\'', value) ||
|
n.getQuoted ('\'', value) ||
|
||||||
n.getUntilEOS (value))
|
n.getUntilEOS (value) ||
|
||||||
|
n.depleted ())
|
||||||
{
|
{
|
||||||
std::string canonical;
|
std::string canonical;
|
||||||
if (canonicalize (canonical, "uda", name))
|
if (canonicalize (canonical, "uda", name))
|
||||||
|
@ -849,7 +850,10 @@ void Parser::findAttribute ()
|
||||||
branch->attribute ("raw", "==");
|
branch->attribute ("raw", "==");
|
||||||
|
|
||||||
branch = (*i)->addBranch (new Tree ("argAtt"));
|
branch = (*i)->addBranch (new Tree ("argAtt"));
|
||||||
branch->attribute ("raw", value);
|
if (value != "")
|
||||||
|
branch->attribute ("raw", value);
|
||||||
|
else
|
||||||
|
branch->attribute ("raw", "'" + value + "'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue