small HtmlTransformer refactoring