mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
DOCX Output: Fix links to empty inline tags not working. Fixes #1683188 [Losing all bookmarks while converting azw3 files to docx](https://bugs.launchpad.net/calibre/+bug/1683188)
This commit is contained in:
parent
650ce8aebc
commit
901e650e9d
@ -568,6 +568,9 @@ class Convert(object):
|
|||||||
if html_tag.text:
|
if html_tag.text:
|
||||||
block = self.create_block_from_parent(html_tag, stylizer)
|
block = self.create_block_from_parent(html_tag, stylizer)
|
||||||
block.add_text(html_tag.text, tag_style, is_parent_style=False, bookmark=bmark, link=self.current_link, lang=self.current_lang)
|
block.add_text(html_tag.text, tag_style, is_parent_style=False, bookmark=bmark, link=self.current_link, lang=self.current_lang)
|
||||||
|
elif bmark:
|
||||||
|
block = self.create_block_from_parent(html_tag, stylizer)
|
||||||
|
block.bookmarks.add(bmark)
|
||||||
|
|
||||||
def bookmark_for_anchor(self, anchor, html_tag):
|
def bookmark_for_anchor(self, anchor, html_tag):
|
||||||
return self.links_manager.bookmark_for_anchor(anchor, self.current_item, html_tag)
|
return self.links_manager.bookmark_for_anchor(anchor, self.current_item, html_tag)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user