mirror of https://github.com/sveltejs/svelte
fix: ignore text and expressions outside the template when validating HTML (#14468)
fixes #14466 The logic introduced in #14395 was flawed - not every text or expression outside the template is the child of an attribute. This turns it around: We know that every child of a fragment is inside the template, so we ignore all text/expression tags that are not child of a fragmentpull/14464/head
parent
c4ac0e01e7
commit
d62e7bdbe1
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'svelte': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: ignore text and expressions outside the template when validating HTML
|
@ -0,0 +1,14 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"code": "node_invalid_placement",
|
||||||
|
"message": "Text node is invalid inside `<tbody>`",
|
||||||
|
"start": {
|
||||||
|
"line": 3,
|
||||||
|
"column": 8
|
||||||
|
},
|
||||||
|
"end": {
|
||||||
|
"line": 3,
|
||||||
|
"column": 13
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
<table attr={value} style:x={y} class="I'm not {counted} as text in the table">
|
||||||
|
<tbody>I am {bad}</tbody>
|
||||||
|
</table>
|
Loading…
Reference in new issue