git.iko.soy/typeable/pandoc
on master help sign in
EPUB writer: add epub:type="footnotes" to notes section in EPUB3.

Closes #4489.

commitc997f112b737ef11341ed07007de50a4d76a8b30 authorJohn MacFarlane <jgm@berkeley.edu> dateFri 30 Mar 2018, 09:38 (9 years ago) parent7f97b04
1 file changed+5
src/Text/Pandoc/Writers/HTML.hs+5
src/Text/Pandoc/Writers/HTML.hs+5
@@ -478,7 +478,12 @@ footnoteSection opts notes = do
478478 html5 <- gets stHtml5
479479 slideVariant <- gets stSlideVariant
480480 let hrtag = if html5 then H5.hr else H.hr
481+ epubVersion <- gets stEPUBVersion
481482 let container x
483+ | html5
484+ , epubVersion == Just EPUB3
485+ = H5.section ! A.class_ "footnotes"
486+ ! customAttribute "epub:type" "footnotes" $ x
482487 | html5 = H5.section ! A.class_ "footnotes" $ x
483488 | slideVariant /= NoSlides = H.div ! A.class_ "footnotes slide" $ x
484489 | otherwise = H.div ! A.class_ "footnotes" $ x