Good... now let's make a formal specification for this:
<ahahah>mmm... <ohoho>nope.</ahaha></ohoho>
Fully joking :-P <ahahah>mmm... <ohoho>nope.</ahaha></ohoho>
Fully joking :-Pedit: 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.