Bug
- The arguments // and /// were being mis-identified as patterns.
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user