@@ -44,7 +44,7 @@ import qualified Text.XML.Light.Cursor as XC
4444
4545import Text.Pandoc.Definition
4646import Text.Pandoc.Options (WriterOptions(..), HTMLMathMethod(..), def)
47−import Text.Pandoc.Shared (orderedListMarkers)
47+import Text.Pandoc.Shared (orderedListMarkers, isHeaderBlock)
4848import Text.Pandoc.Walk
4949
5050-- | Data to be written at the end of the document:
@@ -157,9 +157,7 @@ renderSection level (ttl, body) = do
157157 else cMapM blockToXml body
158158 return $ el "section" (title ++ content)
159159 where
160− hasSubsections = any isHeader
161− isHeader (Header _ _ _) = True
162− isHeader _ = False
160+ hasSubsections = any isHeaderBlock
163161
164162-- | Only <p> and <empty-line> are allowed within <title> in FB2.
165163formatTitle :: [Inline] -> [Content]