Skip to content

Commit ca97ffb

Browse files
committed
Merge pull request webpack-contrib#130 from dtinth/patch-1
Allow ISO 10646 characters U+00A0 and higher in local ident
2 parents 387cbcb + 81b97c6 commit ca97ffb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/getLocalIdent.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ module.exports = function getLocalIdent(loaderContext, localIdentName, localName
1111
options.context = loaderContext.options && typeof loaderContext.options.context === "string" ? loaderContext.options.context : loaderContext.context;
1212
localIdentName = localIdentName.replace(/\[local\]/gi, localName);
1313
var hash = loaderUtils.interpolateName(loaderContext, localIdentName, options);
14-
return hash.replace(/[^a-zA-Z0-9\-_]/g, "-").replace(/^([^a-zA-Z_])/, "_$1");
14+
return hash.replace(new RegExp("[^a-zA-Z0-9\\-_\u00A0-\uFFFF]", "g"), "-").replace(/^([^a-zA-Z_])/, "_$1");
1515
};

0 commit comments

Comments
 (0)