diff --git a/src/calibre/ebooks/fb2/fb2ml.py b/src/calibre/ebooks/fb2/fb2ml.py index 9d41111055..ed7a1a459e 100644 --- a/src/calibre/ebooks/fb2/fb2ml.py +++ b/src/calibre/ebooks/fb2/fb2ml.py @@ -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('') self.section_level -= 1 fb2_out.append('
')