git.iko.soy/typeable/pandoc
on master help sign in
EPUB writer: fix regression on detection of front/back/bodymatter.

This bug caused sections with epub:type "dedication" to be misplaced in bodymatter instead of frontmatter as specified in the manual. The same problem would affect other epub:types. The pattern matching needed to be changed with the use of `makeSection`. Closes #6170.

commitc78b30bd286f49cb0a0951a1f022e2626a9295dd authorJohn MacFarlane <jgm@berkeley.edu> dateWed 4 Mar 2020, 08:42 (7 years ago) parent43711ad
1 file changed+2−1
src/Text/Pandoc/Writers/EPUB.hs+2−1
src/Text/Pandoc/Writers/EPUB.hs+2−1
@@ -595,7 +595,8 @@ pandocToEPUB version opts doc = do
595595 <> cssvars True <> vars } pdoc
596596 where (pdoc, bodyType) =
597597 case bs of
598− (Header _ (_,_,kvs) xs : _) ->
598+ (Div (_,"section":_,kvs)
599+ (Header _ _ xs : _) : _) ->
599600 -- remove notes or we get doubled footnotes
600601 (Pandoc (setMeta "title"
601602 (walk removeNote $ fromList xs) nullMeta) bs,