minimatch
Advanced tools
Comparing version 4.2.0 to 4.2.1
@@ -475,4 +475,12 @@ const minimatch = module.exports = (p, pattern, options = {}) => { | ||
// skip over any that are escaped. | ||
if (escaping && reSpecials[c]) { | ||
re += '\\' + c | ||
if (escaping) { | ||
/* istanbul ignore next - completely not allowed, even escaped. */ | ||
if (c === '/') { | ||
return false | ||
} | ||
if (reSpecials[c]) { | ||
re += '\\' | ||
} | ||
re += c | ||
escaping = false | ||
@@ -485,3 +493,2 @@ continue | ||
case '/': { | ||
// completely not allowed, even escaped. | ||
// Should already be path-split by now. | ||
@@ -569,5 +576,4 @@ return false | ||
case '|': | ||
if (inClass || !patternListStack.length || escaping) { | ||
if (inClass || !patternListStack.length) { | ||
re += '\\|' | ||
escaping = false | ||
continue | ||
@@ -603,3 +609,2 @@ } | ||
re += '\\' + c | ||
escaping = false | ||
continue | ||
@@ -639,7 +644,3 @@ } | ||
if (escaping) { | ||
// no need | ||
escaping = false | ||
} else if (reSpecials[c] | ||
&& !(c === '^' && inClass)) { | ||
if (reSpecials[c] && !(c === '^' && inClass)) { | ||
re += '\\' | ||
@@ -649,2 +650,3 @@ } | ||
re += c | ||
break | ||
@@ -679,2 +681,3 @@ } // switch | ||
tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, (_, $1, $2) => { | ||
/* istanbul ignore else - should already be done */ | ||
if (!$2) { | ||
@@ -681,0 +684,0 @@ // the | isn't already escaped, so escape it. |
@@ -5,3 +5,3 @@ { | ||
"description": "a glob matcher in javascript", | ||
"version": "4.2.0", | ||
"version": "4.2.1", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "type": "git", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36033
766