Skip to content

Commit c7fcb30

Browse files
committed
glob 💄
1 parent 912becc commit c7fcb30

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/vs/base/common/glob.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ function parseRegExp(pattern: string): string {
118118
const segments = splitGlobAware(pattern, GLOB_SPLIT);
119119

120120
// Special case where we only have globstars
121-
if (segments.every(s => s === GLOBSTAR)) {
121+
if (segments.every(segment => segment === GLOBSTAR)) {
122122
regEx = '.*';
123123
}
124124

@@ -198,7 +198,7 @@ function parseRegExp(pattern: string): string {
198198
const choices = splitGlobAware(braceVal, ',');
199199

200200
// Converts {foo,bar} => [foo|bar]
201-
const braceRegExp = `(?:${choices.map(c => parseRegExp(c)).join('|')})`;
201+
const braceRegExp = `(?:${choices.map(choice => parseRegExp(choice)).join('|')})`;
202202

203203
regEx += braceRegExp;
204204

@@ -675,7 +675,7 @@ function parseExpressionPattern(pattern: string, value: boolean | SiblingClause,
675675
const clausePattern = when.replace('$(basename)', name!);
676676
const matched = hasSibling(clausePattern);
677677
return isThenable(matched) ?
678-
matched.then(m => m ? pattern : null) :
678+
matched.then(match => match ? pattern : null) :
679679
matched ? pattern : null;
680680
};
681681
result.requiresSiblings = true;

src/vs/base/test/common/glob.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ suite('Glob', () => {
725725
assert.strictEqual(glob.match(expr, 'foo.as'), null);
726726
});
727727

728-
test.skip('expression with non-trivia glob (issue 142781)', function () {
728+
test.skip('expression with non-trivia glob (issue 144458)', function () {
729729
let pattern = '**/p*';
730730

731731
assert.strictEqual(glob.match(pattern, 'foo/barp'), false);

0 commit comments

Comments
 (0)