hgbook
changeset 899:53a382ea07aa
Add option to the html parser to try to avoid empty nodes.
Hope it makes any difference. :)
Hope it makes any difference. :)
author | dukebody <dukebody@gmail.com> |
---|---|
date | Mon Oct 26 14:12:27 2009 +0100 (2009-10-26) |
parents | 56eed78c4395 |
children | 5e63e72aed10 |
files | web/hgbook/converter.py |
line diff
1.1 --- a/web/hgbook/converter.py Mon Oct 26 13:28:29 2009 +0100 1.2 +++ b/web/hgbook/converter.py Mon Oct 26 14:12:27 2009 +0100 1.3 @@ -22,7 +22,7 @@ 1.4 except IndexError: 1.5 raise IndexError("Usage: %s <path-to-html-file>" % __file__) 1.6 1.7 -tree = etree.parse(filename, html.HTMLParser()) 1.8 +tree = etree.parse(filename, html.HTMLParser(remove_blank_text=True)) 1.9 root = tree.getroot() 1.10 1.11 body(root)[0].set('id', doc_id)