Skip to content

Commit

Permalink
Merge pull request #346 from mrmlnc/ISSUE-345_fix_invalid_regular_exp…
Browse files Browse the repository at this point in the history
…ression

ISSUE-345: fix invalid regular expression
  • Loading branch information
mrmlnc committed Jan 7, 2022
2 parents eda8195 + 46d9a97 commit 5ba78d1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"url": "https://mrmlnc.com"
},
"engines": {
"node": ">=8"
"node": ">=8.6.0"
},
"main": "out/index.js",
"typings": "out/index.d.ts",
Expand Down
3 changes: 2 additions & 1 deletion src/managers/patterns.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
/**
* Matches a sequence of two or more consecutive slashes, excluding the first two slashes at the beginning of the string.
* The latter is due to the presence of the device path at the beginning of the UNC path.
* @todo rewrite to negative lookbehind with the next major release.
*/
const DOUBLE_SLASH_RE = /(?<!^)\/{2,}/g;
const DOUBLE_SLASH_RE = /(?!^)\/{2,}/g;

export function transform(patterns: string[]): string[] {
return patterns.map((pattern) => removeDuplicateSlashes(pattern));
Expand Down

0 comments on commit 5ba78d1

Please sign in to comment.