mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Pull from staging
This commit is contained in:
commit
1c2fb111ab
@ -1951,7 +1951,7 @@ class MobiWriter(object):
|
|||||||
self._oeb.logger.info('Generating flat CTOC ...')
|
self._oeb.logger.info('Generating flat CTOC ...')
|
||||||
previousOffset = -1
|
previousOffset = -1
|
||||||
currentOffset = 0
|
currentOffset = 0
|
||||||
for (i, child) in enumerate(toc.iter()):
|
for (i, child) in enumerate(toc.iterdescendants()):
|
||||||
# Only add chapters or articles at depth==1
|
# Only add chapters or articles at depth==1
|
||||||
# no class defaults to 'chapter'
|
# no class defaults to 'chapter'
|
||||||
if child.klass is None : child.klass = 'chapter'
|
if child.klass is None : child.klass = 'chapter'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user