mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Expressions
- DOM lookups now canonicalize attribute names, and no longer return the unmodified name if the lookup yields nothing.
This commit is contained in:
parent
19cb6110bd
commit
a6fadaee67
1 changed files with 3 additions and 2 deletions
|
@ -215,6 +215,7 @@ const std::string DOM::get (const std::string& name, const Task& task)
|
|||
Nibbler n (name);
|
||||
int id;
|
||||
std::string uuid;
|
||||
std::string canonical;
|
||||
|
||||
// Primitives
|
||||
std::string copy_name (name);
|
||||
|
@ -222,8 +223,8 @@ const std::string DOM::get (const std::string& name, const Task& task)
|
|||
return /*_cache[name] =*/ copy_name;
|
||||
|
||||
// <attr>
|
||||
else if (task.has (name))
|
||||
return task.get (name);
|
||||
else if (Arguments::is_attribute (name, canonical))
|
||||
return task.get (canonical);
|
||||
|
||||
// <id>.<name>
|
||||
else if (n.getInt (id))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue