3 ms·
It is a formal specification of what browsers used to do with a broken HTML. Because it is now fully specified, everyone can safely write a broken HTML (half jo
by lifthrasiir 3y ago
It is a formal specification of what browsers used to do with a broken HTML. Because it is now fully specified, everyone can safely write a broken HTML (half joking!), but also there is no longer a surprising behavior due to diverging behaviors from different browsers.
- JodieBenitez 3y agoGood... now let's make a formal specification for this: <ahahah>mmm... <ohoho>nope.</ahaha></ohoho> Fully joking :-P
- ZeroGravitas 3y agoI believe whatwg did in fact specify for this kind of overlapping tag. edit: apparently it has the cute name of "the adoption agency algorithm": https://html.spec.whatwg.org/multipage/parsing.html#adoption-agency-algorithm https://html.spec.whatwg.org/multipage/parsing.html#adoption... > Note: This algorithm's name, the "adoption agency algorithm", comes from the way it causes elements to change parents, and is in contrast with other possible algorithms for dealing with misnested content.
- ainar-g 3y agoAt least the people who named it understood the silliness of the issue, heh.
- lifthrasiir 3y agoIt is not as silly as it sounds. Many programming language implementations allow a partial parser that looks similar to this in order to give better diagnostics even when the AST is incomplete. (I did the same in the past, for example.)