mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-19 19:03:07 +02:00
TW-1606: scheduled.any filter
- The Lexer::dom type worked embedded, but not isolated (thanks to Peter Rochen).
This commit is contained in:
parent
71753ef666
commit
36e31811b0
3 changed files with 7 additions and 3 deletions
|
@ -5,6 +5,7 @@
|
||||||
- TW-1603 Priority color precedence changed since it is a UDA, should be lowered
|
- TW-1603 Priority color precedence changed since it is a UDA, should be lowered
|
||||||
again (thanks to Jens Erat).
|
again (thanks to Jens Erat).
|
||||||
- TW-1605 Japanese translation for Taskwarrior (thanks to Oota Toshiya).
|
- TW-1605 Japanese translation for Taskwarrior (thanks to Oota Toshiya).
|
||||||
|
- TW-1606 scheduled.any filter (thanks to Peter Rochen).
|
||||||
- The 'obfuscate' setting, if set to '1' will replace all text with 'xxx'.
|
- The 'obfuscate' setting, if set to '1' will replace all text with 'xxx'.
|
||||||
|
|
||||||
------ current release ---------------------------
|
------ current release ---------------------------
|
||||||
|
|
|
@ -754,14 +754,16 @@ bool Lexer::isPair (std::string& token, Lexer::Type& type)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_eos - _cursor > 1 &&
|
if (_eos - _cursor >= 1 &&
|
||||||
_text[_cursor] == ':')
|
_text[_cursor] == ':')
|
||||||
{
|
{
|
||||||
_cursor++;
|
_cursor++;
|
||||||
|
|
||||||
if (isString (ignoredToken, ignoredType, '\'') ||
|
if (isString (ignoredToken, ignoredType, '\'') ||
|
||||||
isString (ignoredToken, ignoredType, '"') ||
|
isString (ignoredToken, ignoredType, '"') ||
|
||||||
isWord (ignoredToken, ignoredType))
|
isWord (ignoredToken, ignoredType) ||
|
||||||
|
_eos == _cursor ||
|
||||||
|
_text[_cursor] == ' ')
|
||||||
{
|
{
|
||||||
token = _text.substr (marker, _cursor - marker);
|
token = _text.substr (marker, _cursor - marker);
|
||||||
type = Lexer::Type::pair;
|
type = Lexer::Type::pair;
|
||||||
|
|
|
@ -36,7 +36,7 @@ Context context;
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int main (int argc, char** argv)
|
int main (int argc, char** argv)
|
||||||
{
|
{
|
||||||
UnitTest t (765);
|
UnitTest t (771);
|
||||||
|
|
||||||
std::vector <std::pair <std::string, Lexer::Type>> tokens;
|
std::vector <std::pair <std::string, Lexer::Type>> tokens;
|
||||||
std::string token;
|
std::string token;
|
||||||
|
@ -278,6 +278,7 @@ int main (int argc, char** argv)
|
||||||
// Pair
|
// Pair
|
||||||
{ "name:value", { { "name:value", Lexer::Type::pair }, NO, NO, NO, NO }, },
|
{ "name:value", { { "name:value", Lexer::Type::pair }, NO, NO, NO, NO }, },
|
||||||
{ "desc.cont:pattern", { { "desc.cont:pattern", Lexer::Type::pair }, NO, NO, NO, NO }, },
|
{ "desc.cont:pattern", { { "desc.cont:pattern", Lexer::Type::pair }, NO, NO, NO, NO }, },
|
||||||
|
{ "desc.any:", { { "desc.any:", Lexer::Type::pair }, NO, NO, NO, NO }, },
|
||||||
{ "pro:'P 1'", { { "pro:'P 1'", Lexer::Type::pair }, NO, NO, NO, NO }, },
|
{ "pro:'P 1'", { { "pro:'P 1'", Lexer::Type::pair }, NO, NO, NO, NO }, },
|
||||||
{ "pro:PROJECT", { { "pro:PROJECT", Lexer::Type::pair }, NO, NO, NO, NO }, },
|
{ "pro:PROJECT", { { "pro:PROJECT", Lexer::Type::pair }, NO, NO, NO, NO }, },
|
||||||
{ "due:'eow - 2d'", { { "due:'eow - 2d'", Lexer::Type::pair }, NO, NO, NO, NO }, },
|
{ "due:'eow - 2d'", { { "due:'eow - 2d'", Lexer::Type::pair }, NO, NO, NO, NO }, },
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue