1. ms2ger
  2. Anolis

Commits

Geoffrey Sneddon  committed cac411a

We will support html5lib 0.11 despite jgraham's wishes.

  • Participants
  • Parent commits a62b96a
  • Branches default

Comments (0)

Files changed (1)

File anolislib/generator.py

View file
  • Ignore whitespace
         tree = lxml.html.parse(input)
     # Parse as HTML using html5lib
     else:
-        tree = html5lib.parse(input, treebuilder="lxml")
+        builder = treebuilders.getTreeBuilder("lxml", etree)
+        parser = html5lib.HTMLParser(tree=builder)
+        tree = parser.parse(input)
 
     # Close the input file
     input.close()