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
A p element’s end tag can be omitted if the p element is immediately followed by an address, article, aside, blockquote, details, div, dl, fieldset, figcaption, figure, footer, form, h1, h2, h3, h4, h5, h6, header, hgroup, hr, main, menu, nav, ol, p, pre, search, section, table, or ul element, or if there is no more content in the parent element and the parent element is an HTML element that is not an a, audio, del, ins, map, noscript, or video element, or an autonomous custom element.
This leads to cases where:
<p><h1>hello</h1></p>
...will be turned into this by the browser:
<p></p><h1>Hello</h1>
<p></p>
This confuses Preact as it's sort of a hydration mismatch and the vnode tree doesn't match the HTML anymore.
The text was updated successfully, but these errors were encountered:
can be created in (p)react clientside or raw dom. But if rendered to string on a server, and then later parsed by the browser's HTML parser, it will parse as:
The HTML spec has some special cases surrounding the
<p>
tag: https://html.spec.whatwg.org/multipage/grouping-content.html#the-p-elementThis leads to cases where:
...will be turned into this by the browser:
This confuses Preact as it's sort of a hydration mismatch and the vnode tree doesn't match the HTML anymore.
The text was updated successfully, but these errors were encountered: