3 ms·
>Ill-formed markup, e.g., <em><p></em></p>, would result in an ill-formed DOM. our parser back then would never produce ill-formed DOM, and in this case it wou
by trhway 5y ago
>Ill-formed markup, e.g., <em><p></em></p>, would result in an ill-formed DOM.
our parser back then would never produce ill-formed DOM, and in this case it would have produced DOM as if for <em><p></p></em> - i.e. it would have inserted </p> upon meeting </em> to match the <p> and would have dropped the unmatched as result </p> after </em>.
- fifilura 5y agoThat is the DOM part yes. But it wouldn't solve the expected emphasized rendering of the supposed text after <p>. The parser I know best would store a special pointer from the <em> element to where it ends, i.e. the text element between <p> and </em> and keep track of that state to end <em> rendering after passing the closing tag.