diff options
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r-- | src/Text/Pandoc/Writers/HTML.hs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs index 3111cbecb..32d52f3e7 100644 --- a/src/Text/Pandoc/Writers/HTML.hs +++ b/src/Text/Pandoc/Writers/HTML.hs @@ -731,8 +731,12 @@ inlineToHtml opts inline = Just EPUB3 -> link ! customAttribute "epub:type" "noteref" _ -> link return $ H.sup $ link' - (Cite _ il) -> do contents <- inlineListToHtml opts il - return $ H.span ! A.class_ "citation" $ contents + (Cite cits il)-> do contents <- inlineListToHtml opts il + let citationIds = unwords $ map citationId cits + let result = H.span ! A.class_ "citation" $ contents + return $ if writerHtml5 opts + then result ! customAttribute "data-cites" (toValue citationIds) + else result blockListToNote :: WriterOptions -> String -> [Block] -> State WriterState Html blockListToNote opts ref blocks = |