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:
parent
94ba44cec9
commit
2bb3f33296
1 changed files with 2 additions and 0 deletions
|
@ -180,6 +180,8 @@ renderSection lvl (Div (id',"section":_,_) (Header _ _ title : xs)) = do
|
||||||
then el "section" (title' ++ content)
|
then el "section" (title' ++ content)
|
||||||
else el "section" ([uattr "id" id'], title' ++ content)
|
else el "section" ([uattr "id" id'], title' ++ content)
|
||||||
return [sectionContent]
|
return [sectionContent]
|
||||||
|
renderSection lvl (Div _attr bs) =
|
||||||
|
cMapM (renderSection lvl) bs
|
||||||
renderSection _ b = blockToXml b
|
renderSection _ b = blockToXml b
|
||||||
|
|
||||||
-- | Only <p> and <empty-line> are allowed within <title> in FB2.
|
-- | Only <p> and <empty-line> are allowed within <title> in FB2.
|
||||||
|
|
Loading…
Reference in a new issue