diff options
author | Axetroy <axetroy.dev@gmail.com> | 2019-06-19 12:22:01 +0800 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-06-18 21:22:01 -0700 |
commit | c85b1c06a9804ad41fbccf8fe5a5689f28eb049e (patch) | |
tree | e855fc7c02baaa219aa81a2a54a69b19c1fb3716 /fs/globrex.ts | |
parent | d6e92582cc2267210f71e893b14672783301f87b (diff) |
lint: add max line length rules (denoland/deno_std#507)
Original: https://github.com/denoland/deno_std/commit/b04fda30c8949b6347094b898bfa427c0b9a6162
Diffstat (limited to 'fs/globrex.ts')
-rw-r--r-- | fs/globrex.ts | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/globrex.ts b/fs/globrex.ts index 56def02f8..32a129a67 100644 --- a/fs/globrex.ts +++ b/fs/globrex.ts @@ -76,7 +76,8 @@ export function globrex( if (split) { if (last) segment += str; if (segment !== "") { - if (!flags.includes("g")) segment = `^${segment}$`; // change it 'includes' + // change it 'includes' + if (!flags.includes("g")) segment = `^${segment}$`; path.segments.push(new RegExp(segment, flags)); } segment = ""; @@ -265,8 +266,10 @@ export function globrex( // globstar is enabled, so determine if this is a globstar segment let isGlobstar = starCount > 1 && // multiple "*"'s - (prevChar === "/" || prevChar === undefined) && // from the start of the segment - (nextChar === "/" || nextChar === undefined); // to the end of the segment + // from the start of the segment + (prevChar === "/" || prevChar === undefined) && + // to the end of the segment + (nextChar === "/" || nextChar === undefined); if (isGlobstar) { // it's a globstar, so match zero or more path segments add(GLOBSTAR, { only: "regex" }); |