aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/HTML.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2013-11-12 18:48:06 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2013-11-12 18:48:06 -0800
commitb4441c940dc76d1a64636ef88287b38306ebccb4 (patch)
tree5f81cba67e05b8d2fe8d822d735b694ca9e738be /src/Text/Pandoc/Writers/HTML.hs
parentfa1530285bad425771fc93d83aaf0d816ca31338 (diff)
downloadpandoc-b4441c940dc76d1a64636ef88287b38306ebccb4.tar.gz
HTML/EPUB footnotes: Put `<sup>` tag inside `<a>` tags.
This allows better control of formatting, since the `<a>` tags have a distinguishing class. Closes #1049.
Diffstat (limited to 'src/Text/Pandoc/Writers/HTML.hs')
-rw-r--r--src/Text/Pandoc/Writers/HTML.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs
index c1cca291b..424843539 100644
--- a/src/Text/Pandoc/Writers/HTML.hs
+++ b/src/Text/Pandoc/Writers/HTML.hs
@@ -757,11 +757,11 @@ inlineToHtml opts inline =
writerIdentifierPrefix opts ++ "fn" ++ ref)
! A.class_ "footnoteRef"
! prefixedId opts ("fnref" ++ ref)
+ $ H.sup
$ toHtml ref
- let link' = case writerEpubVersion opts of
- Just EPUB3 -> link ! customAttribute "epub:type" "noteref"
- _ -> link
- return $ H.sup $ link'
+ return $ case writerEpubVersion opts of
+ Just EPUB3 -> link ! customAttribute "epub:type" "noteref"
+ _ -> link
(Cite cits il)-> do contents <- inlineListToHtml opts il
let citationIds = unwords $ map citationId cits
let result = H.span ! A.class_ "citation" $ contents