diff options
author | Leonard Richardson <leonard.richardson@canonical.com> | 2011-02-20 18:28:15 -0500 |
---|---|---|
committer | Leonard Richardson <leonard.richardson@canonical.com> | 2011-02-20 18:28:15 -0500 |
commit | 2f0b16b8ea82b09034dff0e747e29d89e97b5680 (patch) | |
tree | f35913725a819cdd0068180357468dee5bb89240 /beautifulsoup/builder/_html5lib.py | |
parent | 1fa18e957db92cfa056151f4e0d93c44243df1d9 (diff) |
Tree builders now advertise their features.
Diffstat (limited to 'beautifulsoup/builder/_html5lib.py')
-rw-r--r-- | beautifulsoup/builder/_html5lib.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/beautifulsoup/builder/_html5lib.py b/beautifulsoup/builder/_html5lib.py index 020b7ea..395fb9d 100644 --- a/beautifulsoup/builder/_html5lib.py +++ b/beautifulsoup/builder/_html5lib.py @@ -3,7 +3,7 @@ __all__ = [ ] from beautifulsoup.builder import ( - ACCURATE, + PERMISSIVE, HTML, HTMLTreeBuilder, ) @@ -20,7 +20,7 @@ from beautifulsoup.element import ( class HTML5TreeBuilder(HTMLTreeBuilder): """Use html5lib to build a tree.""" - tags = [ACCURATE, HTML] + features = [PERMISSIVE, HTML] def prepare_markup(self, markup, user_specified_encoding): # Store the user-specified encoding for use later on. @@ -55,7 +55,8 @@ class TreeBuilderForHtml5lib(html5lib.treebuilders._base.TreeBuilder): def __init__(self, soup, namespaceHTMLElements): self.soup = soup if namespaceHTMLElements: - warnings.warn("namespaceHTMLElements not supported yet", DataLossWarning) + warnings.warn("namespaceHTMLElements not supported yet", + DataLossWarning) super(TreeBuilderForHtml5lib, self).__init__(namespaceHTMLElements) def documentClass(self): |