mirror of https://github.com/sveltejs/svelte
parent
ef48d35a15
commit
5877d1a64d
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'svelte': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: correctly parse escaped unicode characters in css selector
|
@ -0,0 +1,76 @@
|
|||||||
|
import { test } from '../../test';
|
||||||
|
|
||||||
|
export default test({
|
||||||
|
warnings: [
|
||||||
|
{
|
||||||
|
code: 'css_unused_selector',
|
||||||
|
message: 'Unused CSS selector ".\\61 sdf"',
|
||||||
|
start: {
|
||||||
|
line: 22,
|
||||||
|
column: 1,
|
||||||
|
character: 465
|
||||||
|
},
|
||||||
|
end: {
|
||||||
|
line: 22,
|
||||||
|
column: 10,
|
||||||
|
character: 474
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
code: 'css_unused_selector',
|
||||||
|
message: 'Unused CSS selector ".\\61\n\tsdf"',
|
||||||
|
start: {
|
||||||
|
line: 23,
|
||||||
|
column: 1,
|
||||||
|
character: 492
|
||||||
|
},
|
||||||
|
end: {
|
||||||
|
line: 24,
|
||||||
|
column: 4,
|
||||||
|
character: 501
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
code: 'css_unused_selector',
|
||||||
|
message: 'Unused CSS selector ".\\61\n sdf"',
|
||||||
|
start: {
|
||||||
|
line: 25,
|
||||||
|
column: 1,
|
||||||
|
character: 519
|
||||||
|
},
|
||||||
|
end: {
|
||||||
|
line: 26,
|
||||||
|
column: 4,
|
||||||
|
character: 528
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
code: 'css_unused_selector',
|
||||||
|
message: 'Unused CSS selector "#\\31span"',
|
||||||
|
start: {
|
||||||
|
line: 28,
|
||||||
|
column: 1,
|
||||||
|
character: 547
|
||||||
|
},
|
||||||
|
end: {
|
||||||
|
line: 28,
|
||||||
|
column: 9,
|
||||||
|
character: 555
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
code: 'css_unused_selector',
|
||||||
|
message: 'Unused CSS selector "#\\31 span"',
|
||||||
|
start: {
|
||||||
|
line: 29,
|
||||||
|
column: 1,
|
||||||
|
character: 573
|
||||||
|
},
|
||||||
|
end: {
|
||||||
|
line: 29,
|
||||||
|
column: 10,
|
||||||
|
character: 582
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
@ -0,0 +1,21 @@
|
|||||||
|
#\31\32\33 .svelte-xyz{ color: green; }
|
||||||
|
#\31 23.svelte-xyz { color: green; }
|
||||||
|
#line\a break.svelte-xyz { color: green; }
|
||||||
|
#line\a
|
||||||
|
break.svelte-xyz { color: green; }
|
||||||
|
#line\00000abreak.svelte-xyz { color: green; }
|
||||||
|
#line\00000a break.svelte-xyz { color: green; }
|
||||||
|
#line\00000a break.svelte-xyz { color: green; }
|
||||||
|
.a\1f642 b.svelte-xyz { color: green; }
|
||||||
|
|
||||||
|
.\61sdf.svelte-xyz { color: green; }
|
||||||
|
|
||||||
|
/* (unused) .\61 sdf { color: red; }*/
|
||||||
|
/* (unused) .\61
|
||||||
|
sdf { color: red; }*/
|
||||||
|
/* (unused) .\61
|
||||||
|
sdf { color: red; }*/
|
||||||
|
|
||||||
|
/* (unused) #\31span { color: red; }*/
|
||||||
|
/* (unused) #\31 span { color: red; }*/
|
||||||
|
#\31 .svelte-xyz span:where(.svelte-xyz) { color: green; }
|
@ -0,0 +1,7 @@
|
|||||||
|
<div id="123" class="svelte-xyz"></div>
|
||||||
|
<div class="svelte-xyz" id="line
|
||||||
|
break"></div>
|
||||||
|
<div class="a🙂b svelte-xyz"></div>
|
||||||
|
<div class="asdf svelte-xyz"></div>
|
||||||
|
<div class="asdf svelte-xyz"></div>
|
||||||
|
<div id="1" class="svelte-xyz"><span class="svelte-xyz"></span></div>
|
@ -0,0 +1,31 @@
|
|||||||
|
<div id="123"></div>
|
||||||
|
<div id="line
|
||||||
|
break"></div>
|
||||||
|
<div class="a🙂b"></div>
|
||||||
|
<div class="asdf"></div>
|
||||||
|
<div class="asdf"></div>
|
||||||
|
<div id="1"><span></span></div>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#\31\32\33 { color: green; }
|
||||||
|
#\31 23 { color: green; }
|
||||||
|
#line\a break { color: green; }
|
||||||
|
#line\a
|
||||||
|
break { color: green; }
|
||||||
|
#line\00000abreak { color: green; }
|
||||||
|
#line\00000a break { color: green; }
|
||||||
|
#line\00000a break { color: green; }
|
||||||
|
.a\1f642 b { color: green; }
|
||||||
|
|
||||||
|
.\61sdf { color: green; }
|
||||||
|
|
||||||
|
.\61 sdf { color: red; }
|
||||||
|
.\61
|
||||||
|
sdf { color: red; }
|
||||||
|
.\61
|
||||||
|
sdf { color: red; }
|
||||||
|
|
||||||
|
#\31span { color: red; }
|
||||||
|
#\31 span { color: red; }
|
||||||
|
#\31 span { color: green; }
|
||||||
|
</style>
|
Loading…
Reference in new issue