@ -635,9 +635,22 @@ In some situations a selector may target an element that is not 'visible' to the
### element_implicitly_closed
```
The tag `<%name%>` was implicitly closed by the parent or a next element. This may cause DOM structure being other than expected one.
This element is implicitly closed by the following `%tag%`, which can cause an unexpected DOM structure. Add an explicit `%closing%` to avoid surprises.
```
In HTML, some elements are implicitly closed by another element. For example, you cannot nest a `<p>` inside another `<p>`:
```html
<!-- this HTML... -->
<p><p>hello</p>
<!-- results in this DOM structure -->
<p></p>
<p>hello</p>
```
Similarly, a parent element's closing tag will implicitly close all child elements, even if the `</` was a typo and you meant to create a _new_ element. To avoid ambiguity, it's always a good idea to have an explicit closing tag.
> The tag `<%name%>` was implicitly closed by the parent or a next element. This may cause DOM structure being other than expected one.
> This element is implicitly closed by the following `%tag%`, which can cause an unexpected DOM structure. Add an explicit `%closing%` to avoid surprises.
In HTML, some elements are implicitly closed by another element. For example, you cannot nest a `<p>` inside another `<p>`:
```html
<!-- this HTML... -->
<p><p>hello</p>
<!-- results in this DOM structure -->
<p></p>
<p>hello</p>
```
Similarly, a parent element's closing tag will implicitly close all child elements, even if the `</` was a typo and you meant to create a _new_ element. To avoid ambiguity, it's always a good idea to have an explicit closing tag.
w(node,'element_implicitly_closed',`The tag \`<${name}>\` was implicitly closed by the parent or a next element. This may cause DOM structure being other than expected one.\nhttps://svelte.dev/e/element_implicitly_closed`);
w(node,'element_implicitly_closed',`This element is implicitly closed by the following \`${tag}\`, which can cause an unexpected DOM structure. Add an explicit \`${closing}\` to avoid surprises.\nhttps://svelte.dev/e/element_implicitly_closed`);
"message":"The tag `<div>` was implicitly closed by the parent or a next element. This may cause DOM structure being other than expected one.",
"message":"This element is implicitly closed by the following `</main>`, which can cause an unexpected DOM structure. Add an explicit `</div>` to avoid surprises.",
"start":{
"line":1,
"column":6
@ -13,7 +13,7 @@
},
{
"code":"element_implicitly_closed",
"message":"The tag `<div>` was implicitly closed by the parent or a next element. This may cause DOM structure being other than expected one.",
"message":"This element is implicitly closed by the following `</main>`, which can cause an unexpected DOM structure. Add an explicit `</div>` to avoid surprises.",
"message":"The tag `<p>` was implicitly closed by the parent or a next element. This may cause DOM structure being other than expected one.",
"message":"This element is implicitly closed by the following `<p>`, which can cause an unexpected DOM structure. Add an explicit `</p>` to avoid surprises.",
"start":{
"line":2,
"column":1
@ -13,7 +13,7 @@
},
{
"code":"element_implicitly_closed",
"message":"The tag `<p>` was implicitly closed by the parent or a next element. This may cause DOM structure being other than expected one.",
"message":"This element is implicitly closed by the following `<p>`, which can cause an unexpected DOM structure. Add an explicit `</p>` to avoid surprises.",