Commits

Geoffrey Sneddon committed 227ba77

Make this work out of the box with html5lib tip.

Comments (0)

Files changed (1)

anolislib/generator.py

     # Parse as HTML using html5lib
     else:
         builder = treebuilders.getTreeBuilder("lxml", etree)
-        parser = html5lib.HTMLParser(tree=builder)
+        try:
+            parser = html5lib.HTMLParser(tree=builder, namespaceHTMLElements=False)
+        except TypeError:
+            parser = html5lib.HTMLParser(tree=builder)
         tree = parser.parse(input)
 
     # Close the input file