TW-1647: descriptions that are stringified ids

- Thanks to Daniel Shahaf.
This commit is contained in:
Paul Beckingham 2015-08-04 23:40:27 -04:00
parent 78170e0fd4
commit 036eb6b010
2 changed files with 9 additions and 3 deletions

View file

@ -96,6 +96,7 @@
Shahaf). Shahaf).
- TW-1642 After "--", an apostrophe unexpectedly ends the task description - TW-1642 After "--", an apostrophe unexpectedly ends the task description
(thanks to Jeremy John Reeder). (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). - TW-1648 Typo in Documentation (thanks to Simon W. Jackson).
- Prevent potential task duplication during import for non-pending tasks. - Prevent potential task duplication during import for non-pending tasks.
- Show the active context in "context list", if any is active. - Show the active context in "context list", if any is active.

View file

@ -1317,7 +1317,7 @@ void CLI2::desugarFilterPatterns ()
// //
void CLI2::findIDs () void CLI2::findIDs ()
{ {
bool previousArgWasAnOperator = false; bool previousFilterArgWasAnOperator = false;
int filterCount = 0; int filterCount = 0;
for (auto& a : _args) for (auto& a : _args)
@ -1329,7 +1329,7 @@ void CLI2::findIDs ()
if (a._lextype == Lexer::Type::number) if (a._lextype == Lexer::Type::number)
{ {
// Skip any number that was preceded by an operator. // Skip any number that was preceded by an operator.
if (! previousArgWasAnOperator) if (! previousFilterArgWasAnOperator)
{ {
std::string number = a.attribute ("raw"); std::string number = a.attribute ("raw");
_id_ranges.push_back (std::pair <std::string, std::string> (number, number)); _id_ranges.push_back (std::pair <std::string, std::string> (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;
} }
} }