mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-02-24 14:26:00 +01:00
AZW3 Output: Handle the case of the <guide> reference to a ToC containing an anchor correctly.
This commit is contained in:
parent
dff74b9314
commit
9c68d50e8e
2 changed files with 2 additions and 3 deletions
|
|
@ -311,8 +311,7 @@ def convert(self, oeb, output_path, input_plugin, opts, log):
|
|||
if not passthrough:
|
||||
remove_html_cover(self.oeb, self.log)
|
||||
|
||||
# Split on pagebreaks so that the resulting KF8 works better with
|
||||
# calibre's viewer, which does not support CSS page breaks
|
||||
# Split on pagebreaks so that the resulting KF8 is faster to load
|
||||
from calibre.ebooks.oeb.transforms.split import Split
|
||||
Split()(self.oeb, self.opts)
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ def __init__(self, oeb, opts):
|
|||
if 'toc' in oeb.guide:
|
||||
# Remove spurious toc entry from guide if it is not in spine or it
|
||||
# does not have any hyperlinks
|
||||
href = urlnormalize(oeb.guide['toc'].href)
|
||||
href = urlnormalize(oeb.guide['toc'].href.partition('#')[0])
|
||||
if href in oeb.manifest.hrefs:
|
||||
item = oeb.manifest.hrefs[href]
|
||||
if (hasattr(item.data, 'xpath') and
|
||||
|
|
|
|||
Loading…
Reference in a new issue