Skip to content

Commit f51859b

Browse files
authoredJul 17, 2019
fix: converting reserved and control filesystem characters to - (#972)
1 parent 65e4fc0 commit f51859b

File tree

5 files changed

+193
-102
lines changed

5 files changed

+193
-102
lines changed
 

‎README.md

+9
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,15 @@ Default: `[hash:base64]`
572572
You can configure the generated ident with the `localIdentName` query parameter.
573573
See [loader-utils's documentation](https://github.com/webpack/loader-utils#interpolatename) for more information on options.
574574

575+
Recommendations:
576+
577+
- use `[path][name]__[local]` for development
578+
- use `[hash:base64]` for production
579+
580+
The `[local]` placeholder contains original class.
581+
582+
**Note:** all reserved (`<>:"/\|?*`) and control filesystem characters (excluding characters in the `[local]` placeholder) will be converted to `-`.
583+
575584
**webpack.config.js**
576585

577586
```js

‎src/utils.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,12 @@ function unescape(str) {
7777
});
7878
}
7979

80+
// eslint-disable-next-line no-control-regex
81+
const filenameReservedRegex = /[<>:"/\\|?*\x00-\x1F]/g;
82+
// eslint-disable-next-line no-control-regex
83+
const reControlChars = /[\u0000-\u001f\u0080-\u009f]/g;
84+
const reRelativePath = /^\.+/;
85+
8086
function getLocalIdent(loaderContext, localIdentName, localName, options) {
8187
if (!options.context) {
8288
// eslint-disable-next-line no-param-reassign
@@ -96,7 +102,10 @@ function getLocalIdent(loaderContext, localIdentName, localName, options) {
96102
loaderUtils
97103
.interpolateName(loaderContext, localIdentName, options)
98104
// For `[hash]` placeholder
99-
.replace(/^((-?[0-9])|--)/, '_$1'),
105+
.replace(/^((-?[0-9])|--)/, '_$1')
106+
.replace(filenameReservedRegex, '-')
107+
.replace(reControlChars, '-')
108+
.replace(reRelativePath, '-'),
100109
{ isIdentifier: true }
101110
).replace(/\\\[local\\\]/gi, localName);
102111
}

‎test/__snapshots__/modules-option.test.js.snap

+137-100
Original file line numberDiff line numberDiff line change
@@ -6355,6 +6355,43 @@ exports.locals = {
63556355
63566356
exports[`modules issue #861: warnings 1`] = `Array []`;
63576357
6358+
exports[`modules issue #967: errors 1`] = `Array []`;
6359+
6360+
exports[`modules issue #967: module (evaluated) 1`] = `
6361+
Array [
6362+
Array [
6363+
1,
6364+
".modules-path-placeholder__foo__--sep---sep---sep---sep----sep---sep---sep---sep---sep-- {
6365+
color: red;
6366+
}
6367+
6368+
.modules-path-placeholder__foo\\\\/bar__--sep---sep---sep---sep----sep---sep---sep---sep---sep-- {
6369+
color: blue;
6370+
}
6371+
6372+
.modules-path-placeholder__\\\\[\\\\/\\\\?\\\\<\\\\>\\\\\\\\\\\\\\\\\\\\3A \\\\*\\\\|\\\\\\"\\\\3A \\\\]__--sep---sep---sep---sep----sep---sep---sep---sep---sep-- {
6373+
color: yellow;
6374+
}
6375+
",
6376+
"",
6377+
],
6378+
]
6379+
`;
6380+
6381+
exports[`modules issue #967: module 1`] = `
6382+
"exports = module.exports = require(\\"../../../src/runtime/api.js\\")(false);
6383+
// Module
6384+
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\\", \\"\\"]);
6385+
// Exports
6386+
exports.locals = {
6387+
\\"foo\\": \\"modules-path-placeholder__foo__--sep---sep---sep---sep----sep---sep---sep---sep---sep--\\",
6388+
\\"foo/bar\\": \\"modules-path-placeholder__foo/bar__--sep---sep---sep---sep----sep---sep---sep---sep---sep--\\",
6389+
\\"[/?<>\\\\\\\\\\\\\\\\:*|\\\\\\":]\\": \\"modules-path-placeholder__[/?<>\\\\\\\\\\\\\\\\:*|\\\\\\":]__--sep---sep---sep---sep----sep---sep---sep---sep---sep--\\"
6390+
};"
6391+
`;
6392+
6393+
exports[`modules issue #967: warnings 1`] = `Array []`;
6394+
63586395
exports[`modules should accepts all arguments for getLocalIdent option: errors 1`] = `Array []`;
63596396
63606397
exports[`modules should accepts all arguments for getLocalIdent option: locals 1`] = `
@@ -7553,171 +7590,171 @@ exports[`modules should respects path in localIdentName option: errors 1`] = `Ar
75537590
75547591
exports[`modules should respects path in localIdentName option: locals 1`] = `
75557592
Object {
7556-
"#": "fixtures/modules/--localIdentName--#",
7557-
"##": "fixtures/modules/--localIdentName--##",
7558-
"#.#.#": "fixtures/modules/--localIdentName--#.#.#",
7559-
"#fake-id": "fixtures/modules/--localIdentName--#fake-id",
7560-
"++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.": "fixtures/modules/--localIdentName--++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.",
7561-
"-a-b-c-": "fixtures/modules/--localIdentName---a-b-c-",
7562-
"-a0-34a___f": "fixtures/modules/--localIdentName---a0-34a___f",
7563-
".": "fixtures/modules/--localIdentName--.",
7564-
"123": "fixtures/modules/--localIdentName--123",
7565-
"1a2b3c": "fixtures/modules/--localIdentName--1a2b3c",
7566-
":)": "fixtures/modules/--localIdentName--:)",
7567-
":\`(": "fixtures/modules/--localIdentName--:\`(",
7568-
":hover": "fixtures/modules/--localIdentName--:hover",
7569-
":hover:focus:active": "fixtures/modules/--localIdentName--:hover:focus:active",
7570-
"<><<<>><>": "fixtures/modules/--localIdentName--<><<<>><>",
7571-
"<p>": "fixtures/modules/--localIdentName--<p>",
7572-
"?": "fixtures/modules/--localIdentName--?",
7573-
"@": "fixtures/modules/--localIdentName--@",
7574-
"B&W?": "fixtures/modules/--localIdentName--B&W?",
7575-
"[attr=value]": "fixtures/modules/--localIdentName--[attr=value]",
7576-
"_": "fixtures/modules/--localIdentName--_",
7577-
"_test": "fixtures/modules/--localIdentName--_test",
7578-
"className": "fixtures/modules/--localIdentName--className",
7579-
"f!o!o": "fixtures/modules/--localIdentName--f!o!o",
7580-
"f'o'o": "fixtures/modules/--localIdentName--f'o'o",
7581-
"f*o*o": "fixtures/modules/--localIdentName--f*o*o",
7582-
"f+o+o": "fixtures/modules/--localIdentName--f+o+o",
7583-
"f/o/o": "fixtures/modules/--localIdentName--f/o/o",
7584-
"f\\\\o\\\\o": "fixtures/modules/--localIdentName--f\\\\o\\\\o",
7585-
"foo.bar": "fixtures/modules/--localIdentName--foo.bar",
7586-
"foo/bar": "fixtures/modules/--localIdentName--foo/bar",
7587-
"foo/bar/baz": "fixtures/modules/--localIdentName--foo/bar/baz",
7588-
"foo\\\\bar": "fixtures/modules/--localIdentName--foo\\\\bar",
7589-
"foo\\\\bar\\\\baz": "fixtures/modules/--localIdentName--foo\\\\bar\\\\baz",
7590-
"f~o~o": "fixtures/modules/--localIdentName--f~o~o",
7591-
"m_x_@": "fixtures/modules/--localIdentName--m_x_@",
7592-
"someId": "fixtures/modules/--localIdentName--someId",
7593-
"subClass": "fixtures/modules/--localIdentName--subClass",
7594-
"test": "fixtures/modules/--localIdentName--test",
7595-
"{}": "fixtures/modules/--localIdentName--{}",
7596-
"©": "fixtures/modules/--localIdentName--©",
7597-
"“‘’”": "fixtures/modules/--localIdentName--“‘’”",
7598-
"⌘⌥": "fixtures/modules/--localIdentName--⌘⌥",
7599-
"☺☃": "fixtures/modules/--localIdentName--☺☃",
7600-
"": "fixtures/modules/--localIdentName--",
7601-
"𝄞♪♩♫♬": "fixtures/modules/--localIdentName--𝄞♪♩♫♬",
7602-
"💩": "fixtures/modules/--localIdentName--💩",
7593+
"#": "fixtures-modules-localIdentName__#",
7594+
"##": "fixtures-modules-localIdentName__##",
7595+
"#.#.#": "fixtures-modules-localIdentName__#.#.#",
7596+
"#fake-id": "fixtures-modules-localIdentName__#fake-id",
7597+
"++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.": "fixtures-modules-localIdentName__++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.",
7598+
"-a-b-c-": "fixtures-modules-localIdentName__-a-b-c-",
7599+
"-a0-34a___f": "fixtures-modules-localIdentName__-a0-34a___f",
7600+
".": "fixtures-modules-localIdentName__.",
7601+
"123": "fixtures-modules-localIdentName__123",
7602+
"1a2b3c": "fixtures-modules-localIdentName__1a2b3c",
7603+
":)": "fixtures-modules-localIdentName__:)",
7604+
":\`(": "fixtures-modules-localIdentName__:\`(",
7605+
":hover": "fixtures-modules-localIdentName__:hover",
7606+
":hover:focus:active": "fixtures-modules-localIdentName__:hover:focus:active",
7607+
"<><<<>><>": "fixtures-modules-localIdentName__<><<<>><>",
7608+
"<p>": "fixtures-modules-localIdentName__<p>",
7609+
"?": "fixtures-modules-localIdentName__?",
7610+
"@": "fixtures-modules-localIdentName__@",
7611+
"B&W?": "fixtures-modules-localIdentName__B&W?",
7612+
"[attr=value]": "fixtures-modules-localIdentName__[attr=value]",
7613+
"_": "fixtures-modules-localIdentName___",
7614+
"_test": "fixtures-modules-localIdentName___test",
7615+
"className": "fixtures-modules-localIdentName__className",
7616+
"f!o!o": "fixtures-modules-localIdentName__f!o!o",
7617+
"f'o'o": "fixtures-modules-localIdentName__f'o'o",
7618+
"f*o*o": "fixtures-modules-localIdentName__f*o*o",
7619+
"f+o+o": "fixtures-modules-localIdentName__f+o+o",
7620+
"f/o/o": "fixtures-modules-localIdentName__f/o/o",
7621+
"f\\\\o\\\\o": "fixtures-modules-localIdentName__f\\\\o\\\\o",
7622+
"foo.bar": "fixtures-modules-localIdentName__foo.bar",
7623+
"foo/bar": "fixtures-modules-localIdentName__foo/bar",
7624+
"foo/bar/baz": "fixtures-modules-localIdentName__foo/bar/baz",
7625+
"foo\\\\bar": "fixtures-modules-localIdentName__foo\\\\bar",
7626+
"foo\\\\bar\\\\baz": "fixtures-modules-localIdentName__foo\\\\bar\\\\baz",
7627+
"f~o~o": "fixtures-modules-localIdentName__f~o~o",
7628+
"m_x_@": "fixtures-modules-localIdentName__m_x_@",
7629+
"someId": "fixtures-modules-localIdentName__someId",
7630+
"subClass": "fixtures-modules-localIdentName__subClass",
7631+
"test": "fixtures-modules-localIdentName__test",
7632+
"{}": "fixtures-modules-localIdentName__{}",
7633+
"©": "fixtures-modules-localIdentName__©",
7634+
"“‘’”": "fixtures-modules-localIdentName__“‘’”",
7635+
"⌘⌥": "fixtures-modules-localIdentName__⌘⌥",
7636+
"☺☃": "fixtures-modules-localIdentName__☺☃",
7637+
"": "fixtures-modules-localIdentName__",
7638+
"𝄞♪♩♫♬": "fixtures-modules-localIdentName__𝄞♪♩♫♬",
7639+
"💩": "fixtures-modules-localIdentName__💩",
76037640
}
76047641
`;
76057642
76067643
exports[`modules should respects path in localIdentName option: module (evaluated) 1`] = `
76077644
Array [
76087645
Array [
76097646
1,
7610-
".fixtures\\\\/modules\\\\/--localIdentName--test {
7647+
".fixtures-modules-localIdentName__test {
76117648
background: red;
76127649
}
76137650
7614-
.fixtures\\\\/modules\\\\/--localIdentName--_test {
7651+
.fixtures-modules-localIdentName___test {
76157652
background: blue;
76167653
}
76177654
7618-
.fixtures\\\\/modules\\\\/--localIdentName--className {
7655+
.fixtures-modules-localIdentName__className {
76197656
background: red;
76207657
}
76217658
7622-
#fixtures\\\\/modules\\\\/--localIdentName--someId {
7659+
#fixtures-modules-localIdentName__someId {
76237660
background: green;
76247661
}
76257662
7626-
.fixtures\\\\/modules\\\\/--localIdentName--className .fixtures\\\\/modules\\\\/--localIdentName--subClass {
7663+
.fixtures-modules-localIdentName__className .fixtures-modules-localIdentName__subClass {
76277664
color: green;
76287665
}
76297666
7630-
#fixtures\\\\/modules\\\\/--localIdentName--someId .fixtures\\\\/modules\\\\/--localIdentName--subClass {
7667+
#fixtures-modules-localIdentName__someId .fixtures-modules-localIdentName__subClass {
76317668
color: blue;
76327669
}
76337670
7634-
.fixtures\\\\/modules\\\\/--localIdentName---a0-34a___f {
7671+
.fixtures-modules-localIdentName__-a0-34a___f {
76357672
color: red;
76367673
}
76377674
7638-
.fixtures\\\\/modules\\\\/--localIdentName--m_x_\\\\@ {
7675+
.fixtures-modules-localIdentName__m_x_\\\\@ {
76397676
margin-left: auto !important;
76407677
margin-right: auto !important;
76417678
}
76427679
7643-
.fixtures\\\\/modules\\\\/--localIdentName--B\\\\&W\\\\? {
7680+
.fixtures-modules-localIdentName__B\\\\&W\\\\? {
76447681
margin-left: auto !important;
76457682
margin-right: auto !important;
76467683
}
76477684
76487685
/* matches elements with class=\\":\`(\\" */
7649-
.fixtures\\\\/modules\\\\/--localIdentName--\\\\3A \\\\\`\\\\( {
7686+
.fixtures-modules-localIdentName__\\\\3A \\\\\`\\\\( {
76507687
color: aqua;
76517688
}
76527689
76537690
/* matches elements with class=\\"1a2b3c\\" */
7654-
.fixtures\\\\/modules\\\\/--localIdentName--\\\\31 a2b3c {
7691+
.fixtures-modules-localIdentName__\\\\31 a2b3c {
76557692
color: aliceblue;
76567693
}
76577694
76587695
/* matches the element with id=\\"#fake-id\\" */
7659-
#fixtures\\\\/modules\\\\/--localIdentName--\\\\#fake-id {
7696+
#fixtures-modules-localIdentName__\\\\#fake-id {
76607697
color: antiquewhite;
76617698
}
76627699
76637700
/* matches the element with id=\\"-a-b-c-\\" */
7664-
#fixtures\\\\/modules\\\\/--localIdentName---a-b-c- {
7701+
#fixtures-modules-localIdentName__-a-b-c- {
76657702
color: azure;
76667703
}
76677704
76687705
/* matches the element with id=\\\\" */
7669-
#fixtures\\\\/modules\\\\/--localIdentName--© {
7706+
#fixtures-modules-localIdentName__© {
76707707
color: black;
76717708
}
76727709
7673-
.fixtures\\\\/modules\\\\/--localIdentName--{ background: lime; }
7674-
.fixtures\\\\/modules\\\\/--localIdentName--© { background: lime; }
7675-
.fixtures\\\\/modules\\\\/--localIdentName--“‘’” { background: lime; }
7676-
.fixtures\\\\/modules\\\\/--localIdentName--☺☃ { background: lime; }
7677-
.fixtures\\\\/modules\\\\/--localIdentName--⌘⌥ { background: lime; }
7678-
.fixtures\\\\/modules\\\\/--localIdentName--𝄞♪♩♫♬ { background: lime; }
7679-
.fixtures\\\\/modules\\\\/--localIdentName--💩 { background: lime; }
7680-
.fixtures\\\\/modules\\\\/--localIdentName--\\\\? { background: lime; }
7681-
.fixtures\\\\/modules\\\\/--localIdentName--\\\\@ { background: lime; }
7682-
.fixtures\\\\/modules\\\\/--localIdentName--\\\\. { background: lime; }
7683-
.fixtures\\\\/modules\\\\/--localIdentName--\\\\3A \\\\) { background: lime; }
7684-
.fixtures\\\\/modules\\\\/--localIdentName--\\\\3A \\\\\`\\\\( { background: lime; }
7685-
.fixtures\\\\/modules\\\\/--localIdentName--\\\\31 23 { background: lime; }
7686-
.fixtures\\\\/modules\\\\/--localIdentName--\\\\31 a2b3c { background: lime; }
7687-
.fixtures\\\\/modules\\\\/--localIdentName--\\\\<p\\\\> { background: lime; }
7688-
.fixtures\\\\/modules\\\\/--localIdentName--\\\\<\\\\>\\\\<\\\\<\\\\<\\\\>\\\\>\\\\<\\\\> { background: lime; }
7689-
.fixtures\\\\/modules\\\\/--localIdentName--\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\[\\\\>\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\>\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\>\\\\+\\\\+\\\\+\\\\>\\\\+\\\\<\\\\<\\\\<\\\\<\\\\-\\\\]\\\\>\\\\+\\\\+\\\\.\\\\>\\\\+\\\\.\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\.\\\\.\\\\+\\\\+\\\\+\\\\.\\\\>\\\\+\\\\+\\\\.\\\\<\\\\<\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\.\\\\>\\\\.\\\\+\\\\+\\\\+\\\\.\\\\-\\\\-\\\\-\\\\-\\\\-\\\\-\\\\.\\\\-\\\\-\\\\-\\\\-\\\\-\\\\-\\\\-\\\\-\\\\.\\\\>\\\\+\\\\.\\\\>\\\\. { background: lime; }
7690-
.fixtures\\\\/modules\\\\/--localIdentName--\\\\# { background: lime; }
7691-
.fixtures\\\\/modules\\\\/--localIdentName--\\\\#\\\\# { background: lime; }
7692-
.fixtures\\\\/modules\\\\/--localIdentName--\\\\#\\\\.\\\\#\\\\.\\\\# { background: lime; }
7693-
.fixtures\\\\/modules\\\\/--localIdentName--\\\\_ { background: lime; }
7694-
.fixtures\\\\/modules\\\\/--localIdentName--\\\\{\\\\} { background: lime; }
7695-
.fixtures\\\\/modules\\\\/--localIdentName--\\\\#fake\\\\-id { background: lime; }
7696-
.fixtures\\\\/modules\\\\/--localIdentName--foo\\\\.bar { background: lime; }
7697-
.fixtures\\\\/modules\\\\/--localIdentName--\\\\3A hover { background: lime; }
7698-
.fixtures\\\\/modules\\\\/--localIdentName--\\\\3A hover\\\\3A focus\\\\3A active { background: lime; }
7699-
.fixtures\\\\/modules\\\\/--localIdentName--\\\\[attr\\\\=value\\\\] { background: lime; }
7700-
.fixtures\\\\/modules\\\\/--localIdentName--f\\\\/o\\\\/o { background: lime; }
7701-
.fixtures\\\\/modules\\\\/--localIdentName--f\\\\\\\\o\\\\\\\\o { background: lime; }
7702-
.fixtures\\\\/modules\\\\/--localIdentName--f\\\\*o\\\\*o { background: lime; }
7703-
.fixtures\\\\/modules\\\\/--localIdentName--f\\\\!o\\\\!o { background: lime; }
7704-
.fixtures\\\\/modules\\\\/--localIdentName--f\\\\'o\\\\'o { background: lime; }
7705-
.fixtures\\\\/modules\\\\/--localIdentName--f\\\\~o\\\\~o { background: lime; }
7706-
.fixtures\\\\/modules\\\\/--localIdentName--f\\\\+o\\\\+o { background: lime; }
7707-
7708-
.fixtures\\\\/modules\\\\/--localIdentName--foo\\\\/bar {
7710+
.fixtures-modules-localIdentName__{ background: lime; }
7711+
.fixtures-modules-localIdentName__© { background: lime; }
7712+
.fixtures-modules-localIdentName__“‘’” { background: lime; }
7713+
.fixtures-modules-localIdentName__☺☃ { background: lime; }
7714+
.fixtures-modules-localIdentName__⌘⌥ { background: lime; }
7715+
.fixtures-modules-localIdentName__𝄞♪♩♫♬ { background: lime; }
7716+
.fixtures-modules-localIdentName__💩 { background: lime; }
7717+
.fixtures-modules-localIdentName__\\\\? { background: lime; }
7718+
.fixtures-modules-localIdentName__\\\\@ { background: lime; }
7719+
.fixtures-modules-localIdentName__\\\\. { background: lime; }
7720+
.fixtures-modules-localIdentName__\\\\3A \\\\) { background: lime; }
7721+
.fixtures-modules-localIdentName__\\\\3A \\\\\`\\\\( { background: lime; }
7722+
.fixtures-modules-localIdentName__\\\\31 23 { background: lime; }
7723+
.fixtures-modules-localIdentName__\\\\31 a2b3c { background: lime; }
7724+
.fixtures-modules-localIdentName__\\\\<p\\\\> { background: lime; }
7725+
.fixtures-modules-localIdentName__\\\\<\\\\>\\\\<\\\\<\\\\<\\\\>\\\\>\\\\<\\\\> { background: lime; }
7726+
.fixtures-modules-localIdentName__\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\[\\\\>\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\>\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\>\\\\+\\\\+\\\\+\\\\>\\\\+\\\\<\\\\<\\\\<\\\\<\\\\-\\\\]\\\\>\\\\+\\\\+\\\\.\\\\>\\\\+\\\\.\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\.\\\\.\\\\+\\\\+\\\\+\\\\.\\\\>\\\\+\\\\+\\\\.\\\\<\\\\<\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\.\\\\>\\\\.\\\\+\\\\+\\\\+\\\\.\\\\-\\\\-\\\\-\\\\-\\\\-\\\\-\\\\.\\\\-\\\\-\\\\-\\\\-\\\\-\\\\-\\\\-\\\\-\\\\.\\\\>\\\\+\\\\.\\\\>\\\\. { background: lime; }
7727+
.fixtures-modules-localIdentName__\\\\# { background: lime; }
7728+
.fixtures-modules-localIdentName__\\\\#\\\\# { background: lime; }
7729+
.fixtures-modules-localIdentName__\\\\#\\\\.\\\\#\\\\.\\\\# { background: lime; }
7730+
.fixtures-modules-localIdentName__\\\\_ { background: lime; }
7731+
.fixtures-modules-localIdentName__\\\\{\\\\} { background: lime; }
7732+
.fixtures-modules-localIdentName__\\\\#fake\\\\-id { background: lime; }
7733+
.fixtures-modules-localIdentName__foo\\\\.bar { background: lime; }
7734+
.fixtures-modules-localIdentName__\\\\3A hover { background: lime; }
7735+
.fixtures-modules-localIdentName__\\\\3A hover\\\\3A focus\\\\3A active { background: lime; }
7736+
.fixtures-modules-localIdentName__\\\\[attr\\\\=value\\\\] { background: lime; }
7737+
.fixtures-modules-localIdentName__f\\\\/o\\\\/o { background: lime; }
7738+
.fixtures-modules-localIdentName__f\\\\\\\\o\\\\\\\\o { background: lime; }
7739+
.fixtures-modules-localIdentName__f\\\\*o\\\\*o { background: lime; }
7740+
.fixtures-modules-localIdentName__f\\\\!o\\\\!o { background: lime; }
7741+
.fixtures-modules-localIdentName__f\\\\'o\\\\'o { background: lime; }
7742+
.fixtures-modules-localIdentName__f\\\\~o\\\\~o { background: lime; }
7743+
.fixtures-modules-localIdentName__f\\\\+o\\\\+o { background: lime; }
7744+
7745+
.fixtures-modules-localIdentName__foo\\\\/bar {
77097746
background: hotpink;
77107747
}
77117748
7712-
.fixtures\\\\/modules\\\\/--localIdentName--foo\\\\\\\\bar {
7749+
.fixtures-modules-localIdentName__foo\\\\\\\\bar {
77137750
background: hotpink;
77147751
}
77157752
7716-
.fixtures\\\\/modules\\\\/--localIdentName--foo\\\\/bar\\\\/baz {
7753+
.fixtures-modules-localIdentName__foo\\\\/bar\\\\/baz {
77177754
background: hotpink;
77187755
}
77197756
7720-
.fixtures\\\\/modules\\\\/--localIdentName--foo\\\\\\\\bar\\\\\\\\baz {
7757+
.fixtures-modules-localIdentName__foo\\\\\\\\bar\\\\\\\\baz {
77217758
background: hotpink;
77227759
}
77237760
",
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.foo {
2+
color: red;
3+
}
4+
5+
.foo\/bar {
6+
color: blue;
7+
}
8+
9+
.\[\/\?\<\>\\\\\3A \*\|\"\3A \] {
10+
color: yellow;
11+
}

0 commit comments

Comments
 (0)
Please sign in to comment.