html5tagger
html5tagger copied to clipboard
Turn a Builder into a tree, and allow for pretty printing HTML
The main purpose of this PR is to enable functionality to output HTML with line breaks and indentation for easily viewing and debugging.
tree = HTMLSyntaxTree.create(doc)
tree.display_tree() # Prints a representation of the tree
print(tree.to_html())
print(tree.to_html(pretty=True))