mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Parser
- Fixed bug where ::findAttribute and ::findAttributeModifier were scanning all nodes, but thinking that '--' was a tag, not a raw value.
This commit is contained in:
parent
3f519785d8
commit
f87ead8804
1 changed files with 8 additions and 4 deletions
|
@ -969,7 +969,7 @@ void Parser::findAttribute ()
|
|||
for (i = nodes.begin (); i != nodes.end (); ++i)
|
||||
{
|
||||
std::string raw = (*i)->attribute ("raw");
|
||||
if ((*i)->hasTag ("--"))
|
||||
if (raw == "--")
|
||||
break;
|
||||
|
||||
if (! (*i)->hasTag ("?"))
|
||||
|
@ -1066,11 +1066,17 @@ void Parser::findAttributeModifier ()
|
|||
action = false;
|
||||
|
||||
std::vector <Tree*> nodes;
|
||||
collect (nodes);
|
||||
collect (nodes, collectAll);
|
||||
std::vector <Tree*>::iterator i;
|
||||
for (i = nodes.begin (); i != nodes.end (); ++i)
|
||||
{
|
||||
std::string raw = (*i)->attribute ("raw");
|
||||
if (raw == "--")
|
||||
break;
|
||||
|
||||
if (! (*i)->hasTag ("?"))
|
||||
continue;
|
||||
|
||||
Nibbler n (raw);
|
||||
|
||||
std::string name;
|
||||
|
@ -1280,7 +1286,6 @@ void Parser::findIdSequence ()
|
|||
for (i = nodes.begin (); i != nodes.end (); ++i)
|
||||
{
|
||||
std::string raw = (*i)->attribute ("raw");
|
||||
|
||||
if (raw == "--")
|
||||
break;
|
||||
|
||||
|
@ -1449,7 +1454,6 @@ void Parser::findUUIDList ()
|
|||
for (i = nodes.begin (); i != nodes.end (); ++i)
|
||||
{
|
||||
std::string raw = (*i)->attribute ("raw");
|
||||
|
||||
if (raw == "--")
|
||||
break;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue