mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-02-26 06:34:40 +01:00
...
This commit is contained in:
parent
848b3d166e
commit
7cbf2e2a2c
1 changed files with 4 additions and 3 deletions
|
|
@ -145,9 +145,10 @@ def process_node(node, toc):
|
|||
parent = toc.children[-1] if toc.children else toc
|
||||
process_node(child, parent)
|
||||
else:
|
||||
page = child.get('page', '1')
|
||||
toc.add(child.text or '', 'index.html', 'p' + page)
|
||||
count[0] += 1
|
||||
if child.text:
|
||||
page = child.get('page', '1')
|
||||
toc.add(child.text, 'index.html', 'p' + page)
|
||||
count[0] += 1
|
||||
process_node(outline, toc)
|
||||
if count[0] > 2:
|
||||
root = create_ncx(toc, (lambda x:x), 'pdftohtml', 'en', 'pdftohtml')
|
||||
|
|
|
|||
Loading…
Reference in a new issue