html5tagger icon indicating copy to clipboard operation
html5tagger copied to clipboard

Turn a Builder into a tree, and allow for pretty printing HTML

Open ahopkins opened this issue 1 year ago • 1 comments

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))

ahopkins avatar Aug 28 '23 10:08 ahopkins