diff --git a/ChangeLog b/ChangeLog index eabaf1b0a..becd5c72d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -96,6 +96,7 @@ Shahaf). - TW-1642 After "--", an apostrophe unexpectedly ends the task description (thanks to Jeremy John Reeder). +- TW-1647 descriptions that are stringified ids (thanks to Daniel Shahaf). - TW-1648 Typo in Documentation (thanks to Simon W. Jackson). - Prevent potential task duplication during import for non-pending tasks. - Show the active context in "context list", if any is active. diff --git a/src/CLI2.cpp b/src/CLI2.cpp index 10f63403f..2f79526a8 100644 --- a/src/CLI2.cpp +++ b/src/CLI2.cpp @@ -1317,7 +1317,7 @@ void CLI2::desugarFilterPatterns () // void CLI2::findIDs () { - bool previousArgWasAnOperator = false; + bool previousFilterArgWasAnOperator = false; int filterCount = 0; for (auto& a : _args) @@ -1329,7 +1329,7 @@ void CLI2::findIDs () if (a._lextype == Lexer::Type::number) { // Skip any number that was preceded by an operator. - if (! previousArgWasAnOperator) + if (! previousFilterArgWasAnOperator) { std::string number = a.attribute ("raw"); _id_ranges.push_back (std::pair (number, number)); @@ -1355,7 +1355,12 @@ void CLI2::findIDs () } } - previousArgWasAnOperator = (a._lextype == Lexer::Type::op) ? true : false; + std::string raw = a.attribute ("raw"); + previousFilterArgWasAnOperator = (a._lextype == Lexer::Type::op && + raw != "(" && + raw != ")") + ? true + : false; } }