Skip to content

Commit

Permalink
fix: converting reserved and control filesystem characters to - (#972)
Browse files Browse the repository at this point in the history
  • Loading branch information
evilebottnawi authored Jul 17, 2019
1 parent 65e4fc0 commit f51859b
Show file tree
Hide file tree
Showing 5 changed files with 193 additions and 102 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,15 @@ Default: `[hash:base64]`
You can configure the generated ident with the `localIdentName` query parameter.
See [loader-utils's documentation](https://github.com/webpack/loader-utils#interpolatename) for more information on options.

Recommendations:

- use `[path][name]__[local]` for development
- use `[hash:base64]` for production

The `[local]` placeholder contains original class.

**Note:** all reserved (`<>:"/\|?*`) and control filesystem characters (excluding characters in the `[local]` placeholder) will be converted to `-`.

**webpack.config.js**

```js
Expand Down
11 changes: 10 additions & 1 deletion src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ function unescape(str) {
});
}

// eslint-disable-next-line no-control-regex
const filenameReservedRegex = /[<>:"/\\|?*\x00-\x1F]/g;
// eslint-disable-next-line no-control-regex
const reControlChars = /[\u0000-\u001f\u0080-\u009f]/g;
const reRelativePath = /^\.+/;

function getLocalIdent(loaderContext, localIdentName, localName, options) {
if (!options.context) {
// eslint-disable-next-line no-param-reassign
Expand All @@ -96,7 +102,10 @@ function getLocalIdent(loaderContext, localIdentName, localName, options) {
loaderUtils
.interpolateName(loaderContext, localIdentName, options)
// For `[hash]` placeholder
.replace(/^((-?[0-9])|--)/, '_$1'),
.replace(/^((-?[0-9])|--)/, '_$1')
.replace(filenameReservedRegex, '-')
.replace(reControlChars, '-')
.replace(reRelativePath, '-'),
{ isIdentifier: true }
).replace(/\\\[local\\\]/gi, localName);
}
Expand Down
237 changes: 137 additions & 100 deletions test/__snapshots__/modules-option.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6355,6 +6355,43 @@ exports.locals = {
exports[`modules issue #861: warnings 1`] = `Array []`;
exports[`modules issue #967: errors 1`] = `Array []`;
exports[`modules issue #967: module (evaluated) 1`] = `
Array [
Array [
1,
".modules-path-placeholder__foo__--sep---sep---sep---sep----sep---sep---sep---sep---sep-- {
color: red;
}
.modules-path-placeholder__foo\\\\/bar__--sep---sep---sep---sep----sep---sep---sep---sep---sep-- {
color: blue;
}
.modules-path-placeholder__\\\\[\\\\/\\\\?\\\\<\\\\>\\\\\\\\\\\\\\\\\\\\3A \\\\*\\\\|\\\\\\"\\\\3A \\\\]__--sep---sep---sep---sep----sep---sep---sep---sep---sep-- {
color: yellow;
}
",
"",
],
]
`;
exports[`modules issue #967: module 1`] = `
"exports = module.exports = require(\\"../../../src/runtime/api.js\\")(false);
// Module
exports.push([module.id, \\".modules-path-placeholder__foo__--sep---sep---sep---sep----sep---sep---sep---sep---sep-- {\\\\n color: red;\\\\n}\\\\n\\\\n.modules-path-placeholder__foo\\\\\\\\/bar__--sep---sep---sep---sep----sep---sep---sep---sep---sep-- {\\\\n color: blue;\\\\n}\\\\n\\\\n.modules-path-placeholder__\\\\\\\\[\\\\\\\\/\\\\\\\\?\\\\\\\\<\\\\\\\\>\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\3A \\\\\\\\*\\\\\\\\|\\\\\\\\\\\\\\"\\\\\\\\3A \\\\\\\\]__--sep---sep---sep---sep----sep---sep---sep---sep---sep-- {\\\\n color: yellow;\\\\n}\\\\n\\", \\"\\"]);
// Exports
exports.locals = {
\\"foo\\": \\"modules-path-placeholder__foo__--sep---sep---sep---sep----sep---sep---sep---sep---sep--\\",
\\"foo/bar\\": \\"modules-path-placeholder__foo/bar__--sep---sep---sep---sep----sep---sep---sep---sep---sep--\\",
\\"[/?<>\\\\\\\\\\\\\\\\:*|\\\\\\":]\\": \\"modules-path-placeholder__[/?<>\\\\\\\\\\\\\\\\:*|\\\\\\":]__--sep---sep---sep---sep----sep---sep---sep---sep---sep--\\"
};"
`;
exports[`modules issue #967: warnings 1`] = `Array []`;
exports[`modules should accepts all arguments for getLocalIdent option: errors 1`] = `Array []`;
exports[`modules should accepts all arguments for getLocalIdent option: locals 1`] = `
Expand Down Expand Up @@ -7553,171 +7590,171 @@ exports[`modules should respects path in localIdentName option: errors 1`] = `Ar
exports[`modules should respects path in localIdentName option: locals 1`] = `
Object {
"#": "fixtures/modules/--localIdentName--#",
"##": "fixtures/modules/--localIdentName--##",
"#.#.#": "fixtures/modules/--localIdentName--#.#.#",
"#fake-id": "fixtures/modules/--localIdentName--#fake-id",
"++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.": "fixtures/modules/--localIdentName--++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.",
"-a-b-c-": "fixtures/modules/--localIdentName---a-b-c-",
"-a0-34a___f": "fixtures/modules/--localIdentName---a0-34a___f",
".": "fixtures/modules/--localIdentName--.",
"123": "fixtures/modules/--localIdentName--123",
"1a2b3c": "fixtures/modules/--localIdentName--1a2b3c",
":)": "fixtures/modules/--localIdentName--:)",
":\`(": "fixtures/modules/--localIdentName--:\`(",
":hover": "fixtures/modules/--localIdentName--:hover",
":hover:focus:active": "fixtures/modules/--localIdentName--:hover:focus:active",
"<><<<>><>": "fixtures/modules/--localIdentName--<><<<>><>",
"<p>": "fixtures/modules/--localIdentName--<p>",
"?": "fixtures/modules/--localIdentName--?",
"@": "fixtures/modules/--localIdentName--@",
"B&W?": "fixtures/modules/--localIdentName--B&W?",
"[attr=value]": "fixtures/modules/--localIdentName--[attr=value]",
"_": "fixtures/modules/--localIdentName--_",
"_test": "fixtures/modules/--localIdentName--_test",
"className": "fixtures/modules/--localIdentName--className",
"f!o!o": "fixtures/modules/--localIdentName--f!o!o",
"f'o'o": "fixtures/modules/--localIdentName--f'o'o",
"f*o*o": "fixtures/modules/--localIdentName--f*o*o",
"f+o+o": "fixtures/modules/--localIdentName--f+o+o",
"f/o/o": "fixtures/modules/--localIdentName--f/o/o",
"f\\\\o\\\\o": "fixtures/modules/--localIdentName--f\\\\o\\\\o",
"foo.bar": "fixtures/modules/--localIdentName--foo.bar",
"foo/bar": "fixtures/modules/--localIdentName--foo/bar",
"foo/bar/baz": "fixtures/modules/--localIdentName--foo/bar/baz",
"foo\\\\bar": "fixtures/modules/--localIdentName--foo\\\\bar",
"foo\\\\bar\\\\baz": "fixtures/modules/--localIdentName--foo\\\\bar\\\\baz",
"f~o~o": "fixtures/modules/--localIdentName--f~o~o",
"m_x_@": "fixtures/modules/--localIdentName--m_x_@",
"someId": "fixtures/modules/--localIdentName--someId",
"subClass": "fixtures/modules/--localIdentName--subClass",
"test": "fixtures/modules/--localIdentName--test",
"{}": "fixtures/modules/--localIdentName--{}",
"©": "fixtures/modules/--localIdentName--©",
"“‘’”": "fixtures/modules/--localIdentName--“‘’”",
"⌘⌥": "fixtures/modules/--localIdentName--⌘⌥",
"☺☃": "fixtures/modules/--localIdentName--☺☃",
"": "fixtures/modules/--localIdentName--",
"𝄞♪♩♫♬": "fixtures/modules/--localIdentName--𝄞♪♩♫♬",
"💩": "fixtures/modules/--localIdentName--💩",
"#": "fixtures-modules-localIdentName__#",
"##": "fixtures-modules-localIdentName__##",
"#.#.#": "fixtures-modules-localIdentName__#.#.#",
"#fake-id": "fixtures-modules-localIdentName__#fake-id",
"++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.": "fixtures-modules-localIdentName__++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.",
"-a-b-c-": "fixtures-modules-localIdentName__-a-b-c-",
"-a0-34a___f": "fixtures-modules-localIdentName__-a0-34a___f",
".": "fixtures-modules-localIdentName__.",
"123": "fixtures-modules-localIdentName__123",
"1a2b3c": "fixtures-modules-localIdentName__1a2b3c",
":)": "fixtures-modules-localIdentName__:)",
":\`(": "fixtures-modules-localIdentName__:\`(",
":hover": "fixtures-modules-localIdentName__:hover",
":hover:focus:active": "fixtures-modules-localIdentName__:hover:focus:active",
"<><<<>><>": "fixtures-modules-localIdentName__<><<<>><>",
"<p>": "fixtures-modules-localIdentName__<p>",
"?": "fixtures-modules-localIdentName__?",
"@": "fixtures-modules-localIdentName__@",
"B&W?": "fixtures-modules-localIdentName__B&W?",
"[attr=value]": "fixtures-modules-localIdentName__[attr=value]",
"_": "fixtures-modules-localIdentName___",
"_test": "fixtures-modules-localIdentName___test",
"className": "fixtures-modules-localIdentName__className",
"f!o!o": "fixtures-modules-localIdentName__f!o!o",
"f'o'o": "fixtures-modules-localIdentName__f'o'o",
"f*o*o": "fixtures-modules-localIdentName__f*o*o",
"f+o+o": "fixtures-modules-localIdentName__f+o+o",
"f/o/o": "fixtures-modules-localIdentName__f/o/o",
"f\\\\o\\\\o": "fixtures-modules-localIdentName__f\\\\o\\\\o",
"foo.bar": "fixtures-modules-localIdentName__foo.bar",
"foo/bar": "fixtures-modules-localIdentName__foo/bar",
"foo/bar/baz": "fixtures-modules-localIdentName__foo/bar/baz",
"foo\\\\bar": "fixtures-modules-localIdentName__foo\\\\bar",
"foo\\\\bar\\\\baz": "fixtures-modules-localIdentName__foo\\\\bar\\\\baz",
"f~o~o": "fixtures-modules-localIdentName__f~o~o",
"m_x_@": "fixtures-modules-localIdentName__m_x_@",
"someId": "fixtures-modules-localIdentName__someId",
"subClass": "fixtures-modules-localIdentName__subClass",
"test": "fixtures-modules-localIdentName__test",
"{}": "fixtures-modules-localIdentName__{}",
"©": "fixtures-modules-localIdentName__©",
"“‘’”": "fixtures-modules-localIdentName__“‘’”",
"⌘⌥": "fixtures-modules-localIdentName__⌘⌥",
"☺☃": "fixtures-modules-localIdentName__☺☃",
"": "fixtures-modules-localIdentName__",
"𝄞♪♩♫♬": "fixtures-modules-localIdentName__𝄞♪♩♫♬",
"💩": "fixtures-modules-localIdentName__💩",
}
`;
exports[`modules should respects path in localIdentName option: module (evaluated) 1`] = `
Array [
Array [
1,
".fixtures\\\\/modules\\\\/--localIdentName--test {
".fixtures-modules-localIdentName__test {
background: red;
}
.fixtures\\\\/modules\\\\/--localIdentName--_test {
.fixtures-modules-localIdentName___test {
background: blue;
}
.fixtures\\\\/modules\\\\/--localIdentName--className {
.fixtures-modules-localIdentName__className {
background: red;
}
#fixtures\\\\/modules\\\\/--localIdentName--someId {
#fixtures-modules-localIdentName__someId {
background: green;
}
.fixtures\\\\/modules\\\\/--localIdentName--className .fixtures\\\\/modules\\\\/--localIdentName--subClass {
.fixtures-modules-localIdentName__className .fixtures-modules-localIdentName__subClass {
color: green;
}
#fixtures\\\\/modules\\\\/--localIdentName--someId .fixtures\\\\/modules\\\\/--localIdentName--subClass {
#fixtures-modules-localIdentName__someId .fixtures-modules-localIdentName__subClass {
color: blue;
}
.fixtures\\\\/modules\\\\/--localIdentName---a0-34a___f {
.fixtures-modules-localIdentName__-a0-34a___f {
color: red;
}
.fixtures\\\\/modules\\\\/--localIdentName--m_x_\\\\@ {
.fixtures-modules-localIdentName__m_x_\\\\@ {
margin-left: auto !important;
margin-right: auto !important;
}
.fixtures\\\\/modules\\\\/--localIdentName--B\\\\&W\\\\? {
.fixtures-modules-localIdentName__B\\\\&W\\\\? {
margin-left: auto !important;
margin-right: auto !important;
}
/* matches elements with class=\\":\`(\\" */
.fixtures\\\\/modules\\\\/--localIdentName--\\\\3A \\\\\`\\\\( {
.fixtures-modules-localIdentName__\\\\3A \\\\\`\\\\( {
color: aqua;
}
/* matches elements with class=\\"1a2b3c\\" */
.fixtures\\\\/modules\\\\/--localIdentName--\\\\31 a2b3c {
.fixtures-modules-localIdentName__\\\\31 a2b3c {
color: aliceblue;
}
/* matches the element with id=\\"#fake-id\\" */
#fixtures\\\\/modules\\\\/--localIdentName--\\\\#fake-id {
#fixtures-modules-localIdentName__\\\\#fake-id {
color: antiquewhite;
}
/* matches the element with id=\\"-a-b-c-\\" */
#fixtures\\\\/modules\\\\/--localIdentName---a-b-c- {
#fixtures-modules-localIdentName__-a-b-c- {
color: azure;
}
/* matches the element with id=\\\\" */
#fixtures\\\\/modules\\\\/--localIdentName--© {
#fixtures-modules-localIdentName__© {
color: black;
}
.fixtures\\\\/modules\\\\/--localIdentName--{ background: lime; }
.fixtures\\\\/modules\\\\/--localIdentName--© { background: lime; }
.fixtures\\\\/modules\\\\/--localIdentName--“‘’” { background: lime; }
.fixtures\\\\/modules\\\\/--localIdentName--☺☃ { background: lime; }
.fixtures\\\\/modules\\\\/--localIdentName--⌘⌥ { background: lime; }
.fixtures\\\\/modules\\\\/--localIdentName--𝄞♪♩♫♬ { background: lime; }
.fixtures\\\\/modules\\\\/--localIdentName--💩 { background: lime; }
.fixtures\\\\/modules\\\\/--localIdentName--\\\\? { background: lime; }
.fixtures\\\\/modules\\\\/--localIdentName--\\\\@ { background: lime; }
.fixtures\\\\/modules\\\\/--localIdentName--\\\\. { background: lime; }
.fixtures\\\\/modules\\\\/--localIdentName--\\\\3A \\\\) { background: lime; }
.fixtures\\\\/modules\\\\/--localIdentName--\\\\3A \\\\\`\\\\( { background: lime; }
.fixtures\\\\/modules\\\\/--localIdentName--\\\\31 23 { background: lime; }
.fixtures\\\\/modules\\\\/--localIdentName--\\\\31 a2b3c { background: lime; }
.fixtures\\\\/modules\\\\/--localIdentName--\\\\<p\\\\> { background: lime; }
.fixtures\\\\/modules\\\\/--localIdentName--\\\\<\\\\>\\\\<\\\\<\\\\<\\\\>\\\\>\\\\<\\\\> { background: lime; }
.fixtures\\\\/modules\\\\/--localIdentName--\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\[\\\\>\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\>\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\>\\\\+\\\\+\\\\+\\\\>\\\\+\\\\<\\\\<\\\\<\\\\<\\\\-\\\\]\\\\>\\\\+\\\\+\\\\.\\\\>\\\\+\\\\.\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\.\\\\.\\\\+\\\\+\\\\+\\\\.\\\\>\\\\+\\\\+\\\\.\\\\<\\\\<\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\.\\\\>\\\\.\\\\+\\\\+\\\\+\\\\.\\\\-\\\\-\\\\-\\\\-\\\\-\\\\-\\\\.\\\\-\\\\-\\\\-\\\\-\\\\-\\\\-\\\\-\\\\-\\\\.\\\\>\\\\+\\\\.\\\\>\\\\. { background: lime; }
.fixtures\\\\/modules\\\\/--localIdentName--\\\\# { background: lime; }
.fixtures\\\\/modules\\\\/--localIdentName--\\\\#\\\\# { background: lime; }
.fixtures\\\\/modules\\\\/--localIdentName--\\\\#\\\\.\\\\#\\\\.\\\\# { background: lime; }
.fixtures\\\\/modules\\\\/--localIdentName--\\\\_ { background: lime; }
.fixtures\\\\/modules\\\\/--localIdentName--\\\\{\\\\} { background: lime; }
.fixtures\\\\/modules\\\\/--localIdentName--\\\\#fake\\\\-id { background: lime; }
.fixtures\\\\/modules\\\\/--localIdentName--foo\\\\.bar { background: lime; }
.fixtures\\\\/modules\\\\/--localIdentName--\\\\3A hover { background: lime; }
.fixtures\\\\/modules\\\\/--localIdentName--\\\\3A hover\\\\3A focus\\\\3A active { background: lime; }
.fixtures\\\\/modules\\\\/--localIdentName--\\\\[attr\\\\=value\\\\] { background: lime; }
.fixtures\\\\/modules\\\\/--localIdentName--f\\\\/o\\\\/o { background: lime; }
.fixtures\\\\/modules\\\\/--localIdentName--f\\\\\\\\o\\\\\\\\o { background: lime; }
.fixtures\\\\/modules\\\\/--localIdentName--f\\\\*o\\\\*o { background: lime; }
.fixtures\\\\/modules\\\\/--localIdentName--f\\\\!o\\\\!o { background: lime; }
.fixtures\\\\/modules\\\\/--localIdentName--f\\\\'o\\\\'o { background: lime; }
.fixtures\\\\/modules\\\\/--localIdentName--f\\\\~o\\\\~o { background: lime; }
.fixtures\\\\/modules\\\\/--localIdentName--f\\\\+o\\\\+o { background: lime; }
.fixtures\\\\/modules\\\\/--localIdentName--foo\\\\/bar {
.fixtures-modules-localIdentName__{ background: lime; }
.fixtures-modules-localIdentName__© { background: lime; }
.fixtures-modules-localIdentName__“‘’” { background: lime; }
.fixtures-modules-localIdentName__☺☃ { background: lime; }
.fixtures-modules-localIdentName__⌘⌥ { background: lime; }
.fixtures-modules-localIdentName__𝄞♪♩♫♬ { background: lime; }
.fixtures-modules-localIdentName__💩 { background: lime; }
.fixtures-modules-localIdentName__\\\\? { background: lime; }
.fixtures-modules-localIdentName__\\\\@ { background: lime; }
.fixtures-modules-localIdentName__\\\\. { background: lime; }
.fixtures-modules-localIdentName__\\\\3A \\\\) { background: lime; }
.fixtures-modules-localIdentName__\\\\3A \\\\\`\\\\( { background: lime; }
.fixtures-modules-localIdentName__\\\\31 23 { background: lime; }
.fixtures-modules-localIdentName__\\\\31 a2b3c { background: lime; }
.fixtures-modules-localIdentName__\\\\<p\\\\> { background: lime; }
.fixtures-modules-localIdentName__\\\\<\\\\>\\\\<\\\\<\\\\<\\\\>\\\\>\\\\<\\\\> { background: lime; }
.fixtures-modules-localIdentName__\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\[\\\\>\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\>\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\>\\\\+\\\\+\\\\+\\\\>\\\\+\\\\<\\\\<\\\\<\\\\<\\\\-\\\\]\\\\>\\\\+\\\\+\\\\.\\\\>\\\\+\\\\.\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\.\\\\.\\\\+\\\\+\\\\+\\\\.\\\\>\\\\+\\\\+\\\\.\\\\<\\\\<\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\.\\\\>\\\\.\\\\+\\\\+\\\\+\\\\.\\\\-\\\\-\\\\-\\\\-\\\\-\\\\-\\\\.\\\\-\\\\-\\\\-\\\\-\\\\-\\\\-\\\\-\\\\-\\\\.\\\\>\\\\+\\\\.\\\\>\\\\. { background: lime; }
.fixtures-modules-localIdentName__\\\\# { background: lime; }
.fixtures-modules-localIdentName__\\\\#\\\\# { background: lime; }
.fixtures-modules-localIdentName__\\\\#\\\\.\\\\#\\\\.\\\\# { background: lime; }
.fixtures-modules-localIdentName__\\\\_ { background: lime; }
.fixtures-modules-localIdentName__\\\\{\\\\} { background: lime; }
.fixtures-modules-localIdentName__\\\\#fake\\\\-id { background: lime; }
.fixtures-modules-localIdentName__foo\\\\.bar { background: lime; }
.fixtures-modules-localIdentName__\\\\3A hover { background: lime; }
.fixtures-modules-localIdentName__\\\\3A hover\\\\3A focus\\\\3A active { background: lime; }
.fixtures-modules-localIdentName__\\\\[attr\\\\=value\\\\] { background: lime; }
.fixtures-modules-localIdentName__f\\\\/o\\\\/o { background: lime; }
.fixtures-modules-localIdentName__f\\\\\\\\o\\\\\\\\o { background: lime; }
.fixtures-modules-localIdentName__f\\\\*o\\\\*o { background: lime; }
.fixtures-modules-localIdentName__f\\\\!o\\\\!o { background: lime; }
.fixtures-modules-localIdentName__f\\\\'o\\\\'o { background: lime; }
.fixtures-modules-localIdentName__f\\\\~o\\\\~o { background: lime; }
.fixtures-modules-localIdentName__f\\\\+o\\\\+o { background: lime; }
.fixtures-modules-localIdentName__foo\\\\/bar {
background: hotpink;
}
.fixtures\\\\/modules\\\\/--localIdentName--foo\\\\\\\\bar {
.fixtures-modules-localIdentName__foo\\\\\\\\bar {
background: hotpink;
}
.fixtures\\\\/modules\\\\/--localIdentName--foo\\\\/bar\\\\/baz {
.fixtures-modules-localIdentName__foo\\\\/bar\\\\/baz {
background: hotpink;
}
.fixtures\\\\/modules\\\\/--localIdentName--foo\\\\\\\\bar\\\\\\\\baz {
.fixtures-modules-localIdentName__foo\\\\\\\\bar\\\\\\\\baz {
background: hotpink;
}
",
Expand Down
11 changes: 11 additions & 0 deletions test/fixtures/modules/path-placeholder.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.foo {
color: red;
}

.foo\/bar {
color: blue;
}

.\[\/\?\<\>\\\\\3A \*\|\"\3A \] {
color: yellow;
}
Loading

0 comments on commit f51859b

Please sign in to comment.