mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Enhancements - Complete Record parsing
- Enhanced Record unit tests - Fixed broken Att unit tests - Fixed broken Att
This commit is contained in:
parent
75c220c352
commit
a98951a8c3
5 changed files with 54 additions and 77 deletions
13
src/Att.cpp
13
src/Att.cpp
|
@ -114,19 +114,16 @@ bool Att::parse (Nibbler& n)
|
|||
|
||||
if (n.skip (':'))
|
||||
{
|
||||
if (n.getQuoted ('"', mValue))
|
||||
return true;
|
||||
|
||||
// This is here to tolerate unquoted values.
|
||||
// Both quoted and unquoted Att's are accepted.
|
||||
// Consider removing this for a stricter parse.
|
||||
if (n.getUntil (' ', mValue))
|
||||
if (n.getQuoted ('"', mValue) ||
|
||||
n.getUntil (' ', mValue))
|
||||
{
|
||||
dequote (mValue);
|
||||
decode (mValue);
|
||||
return true;
|
||||
}
|
||||
|
||||
throw std::string ("Missing attribute value");
|
||||
else
|
||||
throw std::string ("Missing attribute value");
|
||||
}
|
||||
else
|
||||
throw std::string ("Missing : after attribute name");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue