mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
FB2 Output: Fix generation of FB2 sections based on a multi-level Table of Contents in the input document. Fixes #1393514 [Incorrect nesting of sections in FB2 output](https://bugs.launchpad.net/calibre/+bug/1393514)
This commit is contained in:
parent
caf343b826
commit
f715fe8dd8
@ -435,7 +435,7 @@ class FB2MLizer(object):
|
||||
|
||||
# Start a new section if necessary
|
||||
if newlevel:
|
||||
if not (newlevel > self.section_level):
|
||||
while newlevel <= self.section_level:
|
||||
fb2_out.append('</section>')
|
||||
self.section_level -= 1
|
||||
fb2_out.append('<section>')
|
||||
|
Loading…
x
Reference in New Issue
Block a user