mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04: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
@ -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…
x
Reference in New Issue
Block a user