aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2022-08-03 16:09:03 -0700
committerJohn MacFarlane <[email protected]>2022-08-03 16:09:03 -0700
commit2bb3f33296f3fbf2aeb9051e2f481b0a66d53c56 (patch)
tree6590cda5a3ab20b1e303e1b8c9f6942b9ae16c2e /src
parent94ba44cec9cb1fc5d260e7e348f0e237c16e111f (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Writers/FB2.hs2
1 files changed, 2 insertions, 0 deletions
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 <p> and <empty-line> are allowed within <title> in FB2.