diff --git a/documentation/docs/98-reference/.generated/compile-warnings.md b/documentation/docs/98-reference/.generated/compile-warnings.md index c218867beb..7dfbe75888 100644 --- a/documentation/docs/98-reference/.generated/compile-warnings.md +++ b/documentation/docs/98-reference/.generated/compile-warnings.md @@ -697,12 +697,6 @@ Using `on:%name%` to listen to the %name% event is deprecated. Use the event att See [the migration guide](v5-migration-guide#Event-changes) for more info. -### head_in_component - -``` -A `` tag was detected in file `%filename%`, component `%component%`, at line %line%. This can lead to runtime errors. Did you mean to use ``? -``` - ### export_let_unused ``` diff --git a/packages/svelte/messages/compile-warnings/template.md b/packages/svelte/messages/compile-warnings/template.md index 2a9fc8716f..3650e07b47 100644 --- a/packages/svelte/messages/compile-warnings/template.md +++ b/packages/svelte/messages/compile-warnings/template.md @@ -83,9 +83,6 @@ In a future version of Svelte, self-closing tags may be upgraded from a warning See [the migration guide](v5-migration-guide#Event-changes) for more info. -## head_in_component -> A `` tag was detected in file `%filename%`, component `%component%`, at line %line%. This can lead to runtime errors. Did you mean to use ``? - ## node_invalid_placement_ssr > %message%. When rendering this component on the server, the resulting HTML will be modified by the browser (by moving, removing, or inserting elements), likely resulting in a `hydration_mismatch` warning diff --git a/packages/svelte/tests/runtime-browser/samples/head-warning/_config.js b/packages/svelte/tests/runtime-browser/samples/head-warning/_config.js index c916ba2d44..fb62be1af2 100644 --- a/packages/svelte/tests/runtime-browser/samples/head-warning/_config.js +++ b/packages/svelte/tests/runtime-browser/samples/head-warning/_config.js @@ -1,18 +1,21 @@ import { test } from '../../assert'; export default test({ - warnings: [{ - code: "head_in_component", - message: "A `` tag was detected in file `(unknown)`, component `_unknown_`, at line 1. This can lead to runtime errors. Did you mean to use ``?\nhttps://svelte.dev/e/head_in_component", - start: { - line: 1, - character: 0, - column: 0 - }, - end: { - line: 3, - character: 73, - column: 7 - } - }] + warnings: [ + { + code: 'head_in_component', + message: + 'A `` tag was detected in file `(unknown)`, component `_unknown_`, at line 1. This can lead to runtime errors. Did you mean to use ``?\nhttps://svelte.dev/e/head_in_component', + start: { + line: 1, + character: 0, + column: 0 + }, + end: { + line: 3, + character: 73, + column: 7 + } + } + ] });