mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 14:14:31 +02:00
ToC Editor: Fix ToC detection in EPUB 3 files with only an NCX and no nav not working
This commit is contained in:
parent
768ca3106c
commit
56a8b58046
1 changed files with 4 additions and 1 deletions
|
|
@ -256,7 +256,10 @@ def get_toc(container, verify_destinations=True):
|
|||
if ver.major < 3:
|
||||
return get_x_toc(container, find_existing_ncx_toc, parse_ncx, verify_destinations=verify_destinations)
|
||||
else:
|
||||
return get_x_toc(container, find_existing_nav_toc, parse_nav, verify_destinations=verify_destinations)
|
||||
ans = get_x_toc(container, find_existing_nav_toc, parse_nav, verify_destinations=verify_destinations)
|
||||
if len(ans) == 0:
|
||||
ans = get_x_toc(container, find_existing_ncx_toc, parse_ncx, verify_destinations=verify_destinations)
|
||||
return ans
|
||||
|
||||
def ensure_id(elem):
|
||||
if elem.tag == XHTML('a'):
|
||||
|
|
|
|||
Loading…
Reference in a new issue