From 2bb3f33296f3fbf2aeb9051e2f481b0a66d53c56 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 3 Aug 2022 16:09:03 -0700 Subject: [PATCH] FB2 writer: fix handling of non-section Divs. This allows the writer to recurse into those Divs and find new sections inside them. See #8123. --- src/Text/Pandoc/Writers/FB2.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Text/Pandoc/Writers/FB2.hs b/src/Text/Pandoc/Writers/FB2.hs index 42a5535c1..81aa7eee8 100644 --- a/src/Text/Pandoc/Writers/FB2.hs +++ b/src/Text/Pandoc/Writers/FB2.hs @@ -180,6 +180,8 @@ renderSection lvl (Div (id',"section":_,_) (Header _ _ title : xs)) = do then el "section" (title' ++ content) else el "section" ([uattr "id" id'], title' ++ content) return [sectionContent] +renderSection lvl (Div _attr bs) = + cMapM (renderSection lvl) bs renderSection _ b = blockToXml b -- | Only

and are allowed within in FB2.