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.
This commit is contained in:
John MacFarlane 2022-08-03 16:09:03 -07:00
parent 94ba44cec9
commit 2bb3f33296

View file

@ -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.