mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #110
This commit is contained in:
parent
f0567e81ae
commit
111bb7ad54
@ -1022,6 +1022,9 @@ class HTMLConverter(object):
|
|||||||
self.end_page()
|
self.end_page()
|
||||||
self.page_break_found = True
|
self.page_break_found = True
|
||||||
self.end_current_para()
|
self.end_current_para()
|
||||||
|
if not tag.contents or not ''.join(tag.contents).strip(): # Handle empty <p></p> elements
|
||||||
|
self.current_block.append(CR())
|
||||||
|
return
|
||||||
self.lstrip_toggle = True
|
self.lstrip_toggle = True
|
||||||
if tag_css.has_key('text-indent'):
|
if tag_css.has_key('text-indent'):
|
||||||
indent = Span.unit_convert(tag_css['text-indent'], self.profile.dpi)
|
indent = Span.unit_convert(tag_css['text-indent'], self.profile.dpi)
|
||||||
@ -1215,6 +1218,7 @@ def try_opf(path, options):
|
|||||||
match.lower().endswith('.gif') or match.lower().endswith('.png'):
|
match.lower().endswith('.gif') or match.lower().endswith('.png'):
|
||||||
options.cover = match
|
options.cover = match
|
||||||
if not options.cover:
|
if not options.cover:
|
||||||
|
# Search for cover image in opf as created by convertlit
|
||||||
ref = soup.package.find('reference', {'type':'other.ms-coverimage-standard'})
|
ref = soup.package.find('reference', {'type':'other.ms-coverimage-standard'})
|
||||||
if ref:
|
if ref:
|
||||||
try:
|
try:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user