summaryrefslogtreecommitdiff
path: root/bs4/builder/_lxml.py
diff options
context:
space:
mode:
authorLeonard Richardson <leonard.richardson@canonical.com>2012-04-03 09:17:03 -0400
committerLeonard Richardson <leonard.richardson@canonical.com>2012-04-03 09:17:03 -0400
commit6a02ce5d6ae8286736d74ce0b616810fa234cbc2 (patch)
tree1e285ba51f60a03d2650cdbd155dee6e3f36a2e5 /bs4/builder/_lxml.py
parent665f26af74d898787c4d29e7fc03d0e1077e4b73 (diff)
Don't split up the markup into chunks when using the lxml HTML parser, which doesn't have the problems of the XML parser.
Diffstat (limited to 'bs4/builder/_lxml.py')
-rw-r--r--bs4/builder/_lxml.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/bs4/builder/_lxml.py b/bs4/builder/_lxml.py
index d97b8d1..5c7b058 100644
--- a/bs4/builder/_lxml.py
+++ b/bs4/builder/_lxml.py
@@ -166,6 +166,10 @@ class LXMLTreeBuilder(HTMLTreeBuilder, LXMLTreeBuilderForXML):
def default_parser(self):
return etree.HTMLParser
+ def feed(self, markup):
+ self.parser.feed(markup)
+ self.parser.close()
+
def test_fragment_to_document(self, fragment):
"""See `TreeBuilder`."""
return u'<html><body>%s</body></html>' % fragment