Skip to content

Commit 5ba78d1

Browse files
authored
Merge pull request #346 from mrmlnc/ISSUE-345_fix_invalid_regular_expression
ISSUE-345: fix invalid regular expression
2 parents eda8195 + 46d9a97 commit 5ba78d1

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"url": "https://mrmlnc.com"
1010
},
1111
"engines": {
12-
"node": ">=8"
12+
"node": ">=8.6.0"
1313
},
1414
"main": "out/index.js",
1515
"typings": "out/index.d.ts",

src/managers/patterns.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
/**
22
* Matches a sequence of two or more consecutive slashes, excluding the first two slashes at the beginning of the string.
33
* The latter is due to the presence of the device path at the beginning of the UNC path.
4+
* @todo rewrite to negative lookbehind with the next major release.
45
*/
5-
const DOUBLE_SLASH_RE = /(?<!^)\/{2,}/g;
6+
const DOUBLE_SLASH_RE = /(?!^)\/{2,}/g;
67

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

0 commit comments

Comments
 (0)