summaryrefslogtreecommitdiff
path: root/beautifulsoup/builder/_html5lib.py
diff options
context:
space:
mode:
authorLeonard Richardson <leonard.richardson@canonical.com>2011-02-20 18:15:17 -0500
committerLeonard Richardson <leonard.richardson@canonical.com>2011-02-20 18:15:17 -0500
commit1fa18e957db92cfa056151f4e0d93c44243df1d9 (patch)
tree3a41d6a36fb55e6a98320eb5ab6f65a4e307e0e4 /beautifulsoup/builder/_html5lib.py
parentfe6a756f95d724456c368544949d41c16d0cc95b (diff)
Started work on a tagging system that should make it easy to find a tree builder that meets your needs.
Diffstat (limited to 'beautifulsoup/builder/_html5lib.py')
-rw-r--r--beautifulsoup/builder/_html5lib.py9
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