- The arguments // and /// were being mis-identified as patterns.
This commit is contained in:
Paul Beckingham 2011-07-10 18:20:46 -04:00
parent 8e0296468e
commit 7f84fa0c80

View file

@ -889,10 +889,14 @@ bool Arguments::is_subst (const std::string& input)
// /<pattern>/
bool Arguments::is_pattern (const std::string& input)
{
Nibbler n (input);
std::string pattern;
if (input.length () > 2 &&
n.getQuoted ('/', pattern, true))
std::string::size_type first = input.find ('/', 0);
std::string::size_type second = input.find ('/', first + 1);
std::string::size_type third = input.find ('/', second + 1);
if (first == 0 &&
second == input.length () - 1 &&
third == std::string::npos &&
second > 1)
return true;
return false;