summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/HTML.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2011-11-07 12:23:05 -0800
committerJohn MacFarlane <fiddlosopher@gmail.com>2011-11-07 12:23:05 -0800
commit4f95aeb6d290b1edcdc5b332bfd60ff69a08df77 (patch)
tree15b88183983b9f9cc1b46bbbe4cb419edf53f473 /src/Text/Pandoc/Writers/HTML.hs
parentfd06f6630176ec88252954985a10aafc1cab17ee (diff)
HTML writer: Use `<section>` for footnotes if html5.
Diffstat (limited to 'src/Text/Pandoc/Writers/HTML.hs')
-rw-r--r--src/Text/Pandoc/Writers/HTML.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs
index 5550db105..f220eb4c7 100644
--- a/src/Text/Pandoc/Writers/HTML.hs
+++ b/src/Text/Pandoc/Writers/HTML.hs
@@ -253,10 +253,12 @@ footnoteSection :: WriterOptions -> [Html] -> Html
footnoteSection opts notes =
if null notes
then noHtml
- else nl opts +++ (thediv ! [theclass "footnotes"]
+ else nl opts +++ (container
$ nl opts +++ hr +++ nl opts +++
(olist << (notes ++ [nl opts])) +++ nl opts)
-
+ where container = if writerHtml5 opts
+ then tag "section" ! [theclass "footnotes"]
+ else thediv ! [theclass "footnotes"]
-- | Parse a mailto link; return Just (name, domain) or Nothing.
parseMailto :: String -> Maybe (String, String)