You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HTML5 has tags where the closing tag is optional. These are: html, head, body, p, dt, dd, li, option, thead, th, tbody, tr, td, tfoot, colgroup (source)
A <p> tag automatically closes the one before, if there was one. So this:
The breadcrumbs (and the document outline) do not seem to be aware of this semantic. Instead of treating both code samples equally, it treats the paragraphs as nested elements when the optional closing tag is omitted.
This behaviour is the same for all of the above mentioned tags.
This also effects automatic indentation. VSCode formats the code as follows:
<p>Lorem
<p>ipsum
<p>dolor
<p>sit
<p>amet
...which is unexpected.
The feature requested is that VSCode should detect HTML tags that get implicitly closed and treat them as if they were closed explicitly. This should be reflected in the document outline as well as in code formatting.
The text was updated successfully, but these errors were encountered:
HTML5 has tags where the closing tag is optional. These are:
html, head, body, p, dt, dd, li, option, thead, th, tbody, tr, td, tfoot, colgroup
(source)A
<p>
tag automatically closes the one before, if there was one. So this:is equivalent to this:
The breadcrumbs (and the document outline) do not seem to be aware of this semantic. Instead of treating both code samples equally, it treats the paragraphs as nested elements when the optional closing tag is omitted.
This behaviour is the same for all of the above mentioned tags.
Link to spec: https://html.spec.whatwg.org/multipage/syntax.html#optional-tags ("12.1.2.4 Optional tags")
This also effects automatic indentation. VSCode formats the code as follows:
...which is unexpected.
The feature requested is that VSCode should detect HTML tags that get implicitly closed and treat them as if they were closed explicitly. This should be reflected in the document outline as well as in code formatting.
The text was updated successfully, but these errors were encountered: