mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix removal of toc reference in spine element
- Don't remove toc property from spine element, when keeping the NCX file
This commit is contained in:
parent
3ed7cc2dda
commit
21c6e3e907
@ -121,7 +121,7 @@ def epub_2_to_3(container, report, previous_nav=None, remove_ncx=True):
|
|||||||
toc_name = find_existing_ncx_toc(container)
|
toc_name = find_existing_ncx_toc(container)
|
||||||
if toc_name and remove_ncx:
|
if toc_name and remove_ncx:
|
||||||
container.remove_item(toc_name)
|
container.remove_item(toc_name)
|
||||||
container.opf_xpath('./opf:spine')[0].attrib.pop('toc', None)
|
container.opf_xpath('./opf:spine')[0].attrib.pop('toc', None)
|
||||||
landmarks = get_landmarks(container)
|
landmarks = get_landmarks(container)
|
||||||
for guide in container.opf_xpath('./opf:guide'):
|
for guide in container.opf_xpath('./opf:guide'):
|
||||||
guide.getparent().remove(guide)
|
guide.getparent().remove(guide)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user