little bf

This commit is contained in:
Fabian Graßl 2010-11-04 20:33:19 +01:00
parent 78b66ad54d
commit fb1f60cee3

View File

@ -154,6 +154,7 @@ class HTMLOutput(OutputFormatPlugin):
body = root.xpath('//h:body', namespaces={'h': 'http://www.w3.org/1999/xhtml'})[0] body = root.xpath('//h:body', namespaces={'h': 'http://www.w3.org/1999/xhtml'})[0]
ebook_content = etree.tostring(body, pretty_print=True, encoding='utf-8') ebook_content = etree.tostring(body, pretty_print=True, encoding='utf-8')
ebook_content = re.sub(r'\<\/?body.*\>', '', ebook_content) ebook_content = re.sub(r'\<\/?body.*\>', '', ebook_content)
ebook_content = re.sub(r'<(div|a|span)([^>]*)/>', r'<\1\2></\1>', ebook_content)
# generate link to next page # generate link to next page
if item.spine_position+1 < len(oeb_book.spine): if item.spine_position+1 < len(oeb_book.spine):