mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Bug
- The arguments // and /// were being mis-identified as patterns.
This commit is contained in:
parent
8e0296468e
commit
7f84fa0c80
1 changed files with 8 additions and 4 deletions
|
@ -889,10 +889,14 @@ bool Arguments::is_subst (const std::string& input)
|
||||||
// /<pattern>/
|
// /<pattern>/
|
||||||
bool Arguments::is_pattern (const std::string& input)
|
bool Arguments::is_pattern (const std::string& input)
|
||||||
{
|
{
|
||||||
Nibbler n (input);
|
std::string::size_type first = input.find ('/', 0);
|
||||||
std::string pattern;
|
std::string::size_type second = input.find ('/', first + 1);
|
||||||
if (input.length () > 2 &&
|
std::string::size_type third = input.find ('/', second + 1);
|
||||||
n.getQuoted ('/', pattern, true))
|
|
||||||
|
if (first == 0 &&
|
||||||
|
second == input.length () - 1 &&
|
||||||
|
third == std::string::npos &&
|
||||||
|
second > 1)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue