aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2018-03-30 09:38:49 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2018-03-30 09:38:49 -0700
commitc997f112b737ef11341ed07007de50a4d76a8b30 (patch)
treee0e722cfae333db6ffc6ca362927a785736d2ebd /src
parent7f97b04862ffbe2bb9efaa648eee284f7949d20d (diff)
downloadpandoc-c997f112b737ef11341ed07007de50a4d76a8b30.tar.gz
EPUB writer: add epub:type="footnotes" to notes section in EPUB3.
Closes #4489.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Writers/HTML.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs
index 80210c975..d1a366445 100644
--- a/src/Text/Pandoc/Writers/HTML.hs
+++ b/src/Text/Pandoc/Writers/HTML.hs
@@ -478,7 +478,12 @@ footnoteSection opts notes = do
html5 <- gets stHtml5
slideVariant <- gets stSlideVariant
let hrtag = if html5 then H5.hr else H.hr
+ epubVersion <- gets stEPUBVersion
let container x
+ | html5
+ , epubVersion == Just EPUB3
+ = H5.section ! A.class_ "footnotes"
+ ! customAttribute "epub:type" "footnotes" $ x
| html5 = H5.section ! A.class_ "footnotes" $ x
| slideVariant /= NoSlides = H.div ! A.class_ "footnotes slide" $ x
| otherwise = H.div ! A.class_ "footnotes" $ x