Add data-cites field to citations in HTML5.
This contains a space-separated list of citation IDs.
This commit is contained in:
parent
809d74b86d
commit
4ed82686e4
1 changed files with 6 additions and 2 deletions
|
@ -731,8 +731,12 @@ inlineToHtml opts inline =
|
||||||
Just EPUB3 -> link ! customAttribute "epub:type" "noteref"
|
Just EPUB3 -> link ! customAttribute "epub:type" "noteref"
|
||||||
_ -> link
|
_ -> link
|
||||||
return $ H.sup $ link'
|
return $ H.sup $ link'
|
||||||
(Cite _ il) -> do contents <- inlineListToHtml opts il
|
(Cite cits il)-> do contents <- inlineListToHtml opts il
|
||||||
return $ H.span ! A.class_ "citation" $ contents
|
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 :: WriterOptions -> String -> [Block] -> State WriterState Html
|
||||||
blockListToNote opts ref blocks =
|
blockListToNote opts ref blocks =
|
||||||
|
|
Loading…
Add table
Reference in a new issue