a refactoring of HtmlElement::Children#to_s