Sitelet https://github.com/webpack/loader-utils/commit/a18d1a4fa8bc77516925747a5d7a5b687569a201
Skip to content
This repository was archived by the owner on Dec 17, 2025. It is now read-only.

Commit a18d1a4

Browse files
authored
Merge pull request #100 from embrace-io/master
Parse string for emoji count before use.
2 parents 8b7834a + eb641cc commit a18d1a4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎lib/interpolateName.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ function interpolateName(loaderContext, name, options) {
7373
)
7474
.replace(
7575
/\[emoji(?::(\d+))?\]/ig,
76-
(all, length) => encodeStringToEmoji(content, length)
76+
(all, length) => encodeStringToEmoji(content, parseInt(length, 10))
7777
);
7878
}
7979
url = url

0 commit comments

Comments
 (0)