@@ -731,8 +731,12 @@ inlineToHtml opts inline =
731731 Just EPUB3 -> link ! customAttribute "epub:type" "noteref"
732732 _ -> link
733733 return $ H.sup $ link'
734− (Cite _ il) -> do contents <- inlineListToHtml opts il
735− return $ H.span ! A.class_ "citation" $ contents
734+ (Cite cits il)-> do contents <- inlineListToHtml opts il
735+ let citationIds = unwords $ map citationId cits
736+ let result = H.span ! A.class_ "citation" $ contents
737+ return $ if writerHtml5 opts
738+ then result ! customAttribute "data-cites" (toValue citationIds)
739+ else result
736740
737741blockListToNote :: WriterOptions -> String -> [Block] -> State WriterState Html
738742blockListToNote opts ref blocks =