diff --git a/.changeset/green-pumpkins-ring.md b/.changeset/green-pumpkins-ring.md new file mode 100644 index 0000000000..20bed8e347 --- /dev/null +++ b/.changeset/green-pumpkins-ring.md @@ -0,0 +1,5 @@ +--- +'svelte': patch +--- + +fix: better error messages for invalid HTML trees diff --git a/documentation/docs/98-reference/.generated/compile-errors.md b/documentation/docs/98-reference/.generated/compile-errors.md index e1925324e6..3bd162d8d7 100644 --- a/documentation/docs/98-reference/.generated/compile-errors.md +++ b/documentation/docs/98-reference/.generated/compile-errors.md @@ -487,12 +487,12 @@ A component cannot have a default export ### node_invalid_placement ``` -%thing% is invalid inside `<%parent%>` +%message%. The browser will 'repair' the HTML (by moving, removing, or inserting elements) which breaks Svelte's assumptions about the structure of your components. ``` HTML restricts where certain elements can appear. In case of a violation the browser will 'repair' the HTML in a way that breaks Svelte's assumptions about the structure of your components. Some examples: -- `
hello
hello
` because `
` cannot contain block-level elements) +- `
hello
hello
` because `
` cannot contain block-level elements) - `` will result in `` (the `
cell |
cell |
hello
hello
` because `
` cannot contain block-level elements) +- `
hello
hello
` because `
` cannot contain block-level elements) - `` will result in `` (the `
cell |
cell |
hello
hello
` because `
` cannot contain block-level elements) +- `
hello
hello
` because `
` cannot contain block-level elements) - `` will result in `` (the `
cell |
cell |
hello
hello
` because `
` cannot contain block-level elements) +- `
hello
hello
` because `
` cannot contain block-level elements) - `` will result in `` (the `
cell |
cell |