Skip to content

Commit d238450

Browse files
sosobalukeed
andauthored
remove regExpEscape const
Co-authored-by: Luke Edwards <[email protected]>
1 parent 29024cd commit d238450

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export function walk(name: string, mapping: Mapping, input: string, options?: t.
4949

5050
if (!!~tmp) {
5151
match = RegExp(
52-
'^' + regExpEscape(key.substring(0, tmp)) + '(.*)' + regExpEscape(key.substring(1+tmp)) + '$'
52+
'^' + key.substring(0, tmp).replace(/\./g, '\\$&') + '(.*)' + key.substring(1+tmp).replace(/\./g, '\\$&') + '$'
5353
).exec(entry);
5454

5555
if (match && match[1]) {

0 commit comments

Comments
 (0)