diff options
Diffstat (limited to 'beautifulsoup/builder/_html5lib.py')
-rw-r--r-- | beautifulsoup/builder/_html5lib.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/beautifulsoup/builder/_html5lib.py b/beautifulsoup/builder/_html5lib.py index 9cca0b0..020b7ea 100644 --- a/beautifulsoup/builder/_html5lib.py +++ b/beautifulsoup/builder/_html5lib.py @@ -2,7 +2,11 @@ __all__ = [ 'HTML5TreeBuilder', ] -from beautifulsoup.builder import HTMLTreeBuilder, SAXTreeBuilder +from beautifulsoup.builder import ( + ACCURATE, + HTML, + HTMLTreeBuilder, + ) import html5lib from html5lib.constants import DataLossWarning import warnings @@ -13,10 +17,11 @@ from beautifulsoup.element import ( Tag, ) - class HTML5TreeBuilder(HTMLTreeBuilder): """Use html5lib to build a tree.""" + tags = [ACCURATE, HTML] + def prepare_markup(self, markup, user_specified_encoding): # Store the user-specified encoding for use later on. self.user_specified_encoding = user_specified_encoding |