Commits

Israel Saeta Pérez committed 53a382e

Add option to the html parser to try to avoid empty nodes.
Hope it makes any difference. :)

  • Participants
  • Parent commits 56eed78

Comments (0)

Files changed (1)

File web/hgbook/converter.py

 except IndexError:
     raise IndexError("Usage: %s <path-to-html-file>" % __file__)
 
-tree = etree.parse(filename, html.HTMLParser())
+tree = etree.parse(filename, html.HTMLParser(remove_blank_text=True))
 root = tree.getroot()
 
 body(root)[0].set('id', doc_id)