mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
DOM
- Converted A3::is_attribute to Parser::canonicalize.
This commit is contained in:
parent
4661cdf0b2
commit
f59109cfab
1 changed files with 4 additions and 3 deletions
|
@ -28,7 +28,6 @@
|
|||
#include <sstream>
|
||||
#include <Context.h>
|
||||
#include <Nibbler.h>
|
||||
#include <A3.h>
|
||||
#include <text.h>
|
||||
#include <i18n.h>
|
||||
#include <DOM.h>
|
||||
|
@ -193,7 +192,8 @@ const std::string DOM::get (const std::string& name, const Task& task)
|
|||
|
||||
if (attr == "id") return format (ref.id);
|
||||
else if (attr == "urgency") return format (ref.urgency_c ());
|
||||
else if (A3::is_attribute (attr, canonical)) return ref.get (canonical);
|
||||
else if (context.parser.canonicalize (canonical, "attribute", attr))
|
||||
return ref.get (canonical);
|
||||
}
|
||||
|
||||
n.restore ();
|
||||
|
@ -216,7 +216,8 @@ const std::string DOM::get (const std::string& name, const Task& task)
|
|||
|
||||
if (attr == "id") return format (ref.id);
|
||||
else if (attr == "urgency") return format (ref.urgency_c (), 4, 3);
|
||||
else if (A3::is_attribute (attr, canonical)) return ref.get (canonical);
|
||||
else if (context.parser.canonicalize (canonical, "attribute", attr))
|
||||
return ref.get (canonical);
|
||||
}
|
||||
|
||||
n.restore ();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue