Skip to content

Commit 807fcec

Browse files
fix(interpolateName): potential issue in hash and contenthash regexp
1 parent 809b690 commit 807fcec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/interpolateName.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ function interpolateName(loaderContext, name, options) {
9191
// `hash` and `contenthash` are same in `loader-utils` context
9292
// let's keep `hash` for backward compatibility
9393
.replace(
94-
/\[(?:([^:\]]+):)?(?:hash||contenthash)(?::([a-z]+\d*))?(?::(\d+))?\]/gi,
94+
/\[(?:([^:\]]+):)?(?:hash|contenthash)(?::([a-z]+\d*))?(?::(\d+))?\]/gi,
9595
(all, hashType, digestType, maxLength) =>
9696
getHashDigest(content, hashType, digestType, parseInt(maxLength, 10))
9797
)

0 commit comments

Comments
 (0)