TW-1608: The recur/recurring report shows tasks without a recur interval

- Lexer needed additional lookbehind criteria for ::isTag (thanks to Brad
  Collette).
This commit is contained in:
Paul Beckingham 2015-05-09 21:27:48 -04:00
parent f30f4d45c6
commit 7293de75b0
3 changed files with 13 additions and 5 deletions

View file

@ -778,14 +778,17 @@ bool Lexer::isPair (std::string& token, Lexer::Type& type)
////////////////////////////////////////////////////////////////////////////////
// Lexer::Type::tag
// ^ | <isWhiteSpace> [ +|- ] <isIdentifierStart> [ <isIdentifierNext> ]*
// ^ | '(' | ')' | <isWhiteSpace>
// [ +|- ] <isIdentifierStart> [ <isIdentifierNext> ]*
bool Lexer::isTag (std::string& token, Lexer::Type& type)
{
std::size_t marker = _cursor;
// Lookbehind: ^ | <isWhiteSpace>
if (marker > 0 &&
! isWhitespace (_text[marker - 1]))
// Lookbehind: ^ | '(' | ')' | <isWhiteSpace>
if (marker > 0 &&
! isWhitespace (_text[marker - 1]) &&
_text[marker - 1] != '(' &&
_text[marker - 1] != ')')
return false;
if (_text[marker] == '+' ||