News for hackers. Stuff that matters.
Re:HTML Optional Tags by ZeroGravitas on Thursday September 14, 2023 @04:32AM (#37506385)
I 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...

> 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.

Re:HTML Optional Tags by ainar-g on Thursday September 14, 2023 @04:56AM (#37506522)
At least the people who named it understood the silliness of the issue, heh.
Re:HTML Optional Tags by lifthrasiir on Thursday September 14, 2023 @05:22AM (#37506683)
It 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.)