1. Israel Saeta Pérez
  2. hgbook-alqua


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
  • Branches default

Comments (0)

Files changed (1)

File web/hgbook/converter.py

View file
  • Ignore whitespace
 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)