@@ -44,7 +44,7 @@ import qualified Text.XML.Light.Cursor as XC
45import Text.Pandoc.Definition
45import Text.Pandoc.Definition
46import Text.Pandoc.Options (WriterOptions(..), HTMLMathMethod(..), def)
46import Text.Pandoc.Options (WriterOptions(..), HTMLMathMethod(..), def)
47−import Text.Pandoc.Shared (orderedListMarkers)
47+import Text.Pandoc.Shared (orderedListMarkers, isHeaderBlock)
48import Text.Pandoc.Walk
48import Text.Pandoc.Walk
50-- | Data to be written at the end of the document:
50-- | Data to be written at the end of the document:
@@ -157,9 +157,7 @@ renderSection level (ttl, body) = do
157 else cMapM blockToXml body
157 else cMapM blockToXml body
158 return $ el "section" (title ++ content)
158 return $ el "section" (title ++ content)
160− hasSubsections = any isHeader
160+ hasSubsections = any isHeaderBlock
161− isHeader (Header _ _ _) = True
164-- | Only <p> and <empty-line> are allowed within <title> in FB2.
162-- | Only <p> and <empty-line> are allowed within <title> in FB2.
165formatTitle :: [Inline] -> [Content]
163formatTitle :: [Inline] -> [Content]