Fix typos (#417)

This commit is contained in:
Pierre Grimaud
2020-04-20 12:56:03 +02:00
committed by GitHub
parent c4b6011310
commit a28977e977
6 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -21,7 +21,7 @@ export class Pattern {
/**
* The path/pattern segments. Note, only the first segment (the root directory)
* may contain a directory separator charactor. Use the trailingSeparator field
* may contain a directory separator character. Use the trailingSeparator field
* to determine whether the pattern ended with a trailing slash.
*/
readonly segments: string[]
@@ -130,7 +130,7 @@ export class Pattern {
itemPath = pathHelper.normalizeSeparators(itemPath)
// Append a trailing slash. Otherwise Minimatch will not match the directory immediately
// preceeding the globstar. For example, given the pattern `/foo/**`, Minimatch returns
// preceding the globstar. For example, given the pattern `/foo/**`, Minimatch returns
// false for `/foo` but returns true for `/foo/`. Append a trailing slash to handle that quirk.
if (!itemPath.endsWith(path.sep)) {
// Note, this is safe because the constructor ensures the pattern has an absolute root.