mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Bug
- Disallowed @ and / from an attribute name or modifier. This causes input like 'user@host:path' to now be parsed as description, and not as an unrecognized attribute.
This commit is contained in:
parent
783a326b11
commit
036d77e08f
4 changed files with 39 additions and 23 deletions
18
src/Att.cpp
18
src/Att.cpp
|
@ -205,14 +205,18 @@ bool Att::valid (const std::string& input) const
|
|||
if (!n.getUntilOneOf (".:", ignored))
|
||||
return false;
|
||||
|
||||
if (n.skip (':') &&
|
||||
(n.getQuoted ('"', ignored) ||
|
||||
n.getUntil (' ', ignored) ||
|
||||
n.getUntilEOS (ignored) ||
|
||||
n.depleted ()))
|
||||
return true;
|
||||
if (n.skip (':'))
|
||||
{
|
||||
if (input.find ('@') <= n.cursor () ||
|
||||
input.find ('/') <= n.cursor ())
|
||||
return false;
|
||||
|
||||
return false;
|
||||
if (n.getQuoted ('"', ignored) ||
|
||||
n.getUntil (' ', ignored) ||
|
||||
n.getUntilEOS (ignored) ||
|
||||
n.depleted ())
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue