pull(/^<([a-zA-Z][a-zA-Z0-9\-]*)/, tag => { const new_tag = { tag, attributes: {}, children: [] }; cursor.children.push(new_tag); parse_attributes(new_tag); parse_content(new_tag); })