mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Parser
- ::findAttribute was not considering all nodes, and failed to remove the "?" tag.
This commit is contained in:
parent
8b904a57f4
commit
59ffcd858e
1 changed files with 8 additions and 5 deletions
|
@ -951,19 +951,23 @@ void Parser::findTag ()
|
|||
// <name>:['"][<value>]['"]
|
||||
void Parser::findAttribute ()
|
||||
{
|
||||
// context.debug ("Parser::findAttribute");
|
||||
bool action = true;
|
||||
|
||||
do
|
||||
{
|
||||
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 ((*i)->hasTag ("--"))
|
||||
break;
|
||||
|
||||
if (! (*i)->hasTag ("?"))
|
||||
continue;
|
||||
|
||||
Nibbler n (raw);
|
||||
|
||||
// Look for a valid attribute name.
|
||||
|
@ -985,6 +989,7 @@ void Parser::findAttribute ()
|
|||
std::string canonical;
|
||||
if (canonicalize (canonical, "uda", name))
|
||||
{
|
||||
(*i)->unTag ("?");
|
||||
(*i)->tag ("UDA");
|
||||
(*i)->tag ("MODIFIABLE");
|
||||
action = true;
|
||||
|
@ -1041,8 +1046,6 @@ void Parser::findAttribute ()
|
|||
}
|
||||
}
|
||||
while (action);
|
||||
|
||||
// context.debug (_tree->dump ());
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue