diff --git a/.changeset/green-pumpkins-ring.md b/.changeset/green-pumpkins-ring.md new file mode 100644 index 000000000000..20bed8e3471e --- /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 16cd361e52c5..fe71b0eef6e4 100644 --- a/documentation/docs/98-reference/.generated/compile-errors.md +++ b/documentation/docs/98-reference/.generated/compile-errors.md @@ -481,12 +481,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 |