mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 13:22:45 +02:00
MOBI Output: Do not ignore an empty anchor at the end of a block element.
This commit is contained in:
parent
1aa2dc2a3c
commit
b6abccf853
1 changed files with 5 additions and 1 deletions
|
|
@ -540,7 +540,11 @@ def mobimlize_elem(self, elem, stylizer, bstate, istates,
|
|||
old_mim = self.opts.mobi_ignore_margins
|
||||
self.opts.mobi_ignore_margins = False
|
||||
|
||||
if text or tag in CONTENT_TAGS or tag in NESTABLE_TAGS:
|
||||
if (text or tag in CONTENT_TAGS or tag in NESTABLE_TAGS or (
|
||||
# We have an id but no text and no children, the id should still
|
||||
# be added.
|
||||
istate.ids and tag in ('a', 'span', 'i', 'b', 'u') and
|
||||
len(elem)==0)):
|
||||
self.mobimlize_content(tag, text, bstate, istates)
|
||||
for child in elem:
|
||||
self.mobimlize_elem(child, stylizer, bstate, istates)
|
||||
|
|
|
|||
Loading…
Reference in a new issue