minimatch 2.0.9 → 2.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser.js +14 -1
- package/minimatch.js +14 -1
- package/package.json +1 -1
package/browser.js
CHANGED
|
@@ -571,11 +571,24 @@ function parse (pattern, isSub) {
|
|
|
571
571
|
var nlFirst = re.slice(nl.reStart, nl.reEnd - 8)
|
|
572
572
|
var nlLast = re.slice(nl.reEnd - 8, nl.reEnd)
|
|
573
573
|
var nlAfter = re.slice(nl.reEnd)
|
|
574
|
+
|
|
575
|
+
nlLast += nlAfter
|
|
576
|
+
|
|
577
|
+
// Handle nested stuff like *(*.js|!(*.json)), where open parens
|
|
578
|
+
// mean that we should *not* include the ) in the bit that is considered
|
|
579
|
+
// "after" the negated section.
|
|
580
|
+
var openParensBefore = nlBefore.split('(').length - 1
|
|
581
|
+
var cleanAfter = nlAfter
|
|
582
|
+
for (i = 0; i < openParensBefore; i++) {
|
|
583
|
+
cleanAfter = cleanAfter.replace(/\)[+*?]?/, '')
|
|
584
|
+
}
|
|
585
|
+
nlAfter = cleanAfter
|
|
586
|
+
|
|
574
587
|
var dollar = ''
|
|
575
588
|
if (nlAfter === '' && isSub !== SUBPARSE) {
|
|
576
589
|
dollar = '$'
|
|
577
590
|
}
|
|
578
|
-
var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast
|
|
591
|
+
var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast
|
|
579
592
|
re = newRe
|
|
580
593
|
}
|
|
581
594
|
|
package/minimatch.js
CHANGED
|
@@ -570,11 +570,24 @@ function parse (pattern, isSub) {
|
|
|
570
570
|
var nlFirst = re.slice(nl.reStart, nl.reEnd - 8)
|
|
571
571
|
var nlLast = re.slice(nl.reEnd - 8, nl.reEnd)
|
|
572
572
|
var nlAfter = re.slice(nl.reEnd)
|
|
573
|
+
|
|
574
|
+
nlLast += nlAfter
|
|
575
|
+
|
|
576
|
+
// Handle nested stuff like *(*.js|!(*.json)), where open parens
|
|
577
|
+
// mean that we should *not* include the ) in the bit that is considered
|
|
578
|
+
// "after" the negated section.
|
|
579
|
+
var openParensBefore = nlBefore.split('(').length - 1
|
|
580
|
+
var cleanAfter = nlAfter
|
|
581
|
+
for (i = 0; i < openParensBefore; i++) {
|
|
582
|
+
cleanAfter = cleanAfter.replace(/\)[+*?]?/, '')
|
|
583
|
+
}
|
|
584
|
+
nlAfter = cleanAfter
|
|
585
|
+
|
|
573
586
|
var dollar = ''
|
|
574
587
|
if (nlAfter === '' && isSub !== SUBPARSE) {
|
|
575
588
|
dollar = '$'
|
|
576
589
|
}
|
|
577
|
-
var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast
|
|
590
|
+
var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast
|
|
578
591
|
re = newRe
|
|
579
592
|
}
|
|
580
593
|
|
package/package.json
CHANGED