mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Parser
- Multiple -- terminators are considered to be a single terminator followed by words that are not terminators. There can be only one!
This commit is contained in:
parent
7f56187748
commit
c5cf4de4a0
2 changed files with 3 additions and 2 deletions
|
@ -263,7 +263,8 @@ void Parser::findTerminator ()
|
|||
std::vector <Tree*>::iterator i;
|
||||
for (i = _tree->_branches.begin (); i != _tree->_branches.end (); ++i)
|
||||
{
|
||||
if ((*i)->attribute ("raw") == "--")
|
||||
if (!found &&
|
||||
(*i)->attribute ("raw") == "--")
|
||||
{
|
||||
(*i)->unTag ("?");
|
||||
(*i)->tag ("TERMINATOR");
|
||||
|
|
|
@ -45,7 +45,7 @@ if (open my $fh, '>', 'bug.rc')
|
|||
|
||||
# Bug #495 - double hyphen mishandled for annotations.
|
||||
qx{../src/task rc:bug.rc add foo 2>&1};
|
||||
qx{../src/task rc:bug.rc 1 annotate "This -- is -- a -- test" 2>&1};
|
||||
qx{../src/task rc:bug.rc 1 annotate This -- is -- a -- test 2>&1};
|
||||
my $output = qx{../src/task rc:bug.rc long 2>&1};
|
||||
like ($output, qr/This is -- a -- test/, 'Double hyphens preserved, except the first ones.');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue