summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Writers/HTML.hs13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs
index 473fd4c14..adabd302e 100644
--- a/src/Text/Pandoc/Writers/HTML.hs
+++ b/src/Text/Pandoc/Writers/HTML.hs
@@ -299,7 +299,7 @@ pandocToHtml opts (Pandoc meta blocks) = do
if null (stNotes st)
then return mempty
else do
- notes <- footnoteSection EndOfDocument (stEmittedNotes st + 1) (reverse (stNotes st))
+ notes <- footnoteSection opts EndOfDocument (stEmittedNotes st + 1) (reverse (stNotes st))
modify (\st' -> st'{ stNotes = mempty, stEmittedNotes = stEmittedNotes st' + length (stNotes st') })
return notes
st <- get
@@ -524,8 +524,8 @@ tableOfContents opts sects = do
-- | Convert list of Note blocks to a footnote <div>.
-- Assumes notes are sorted.
footnoteSection ::
- PandocMonad m => ReferenceLocation -> Int -> [Html] -> StateT WriterState m Html
-footnoteSection refLocation startCounter notes = do
+ PandocMonad m => WriterOptions -> ReferenceLocation -> Int -> [Html] -> StateT WriterState m Html
+footnoteSection opts refLocation startCounter notes = do
html5 <- gets stHtml5
slideVariant <- gets stSlideVariant
let hrtag = if refLocation /= EndOfBlock
@@ -550,7 +550,7 @@ footnoteSection refLocation startCounter notes = do
! A5.class_ className
! A5.role "doc-endnotes"
$ x
- | html5 = H5.aside ! A5.id "footnotes"
+ | html5 = H5.aside ! prefixedId opts "footnotes"
! A5.class_ className
! A5.role "doc-endnotes"
$ x
@@ -805,7 +805,7 @@ blockToHtmlInner opts (Div (ident, "section":dclasses, dkvs)
if emitNotes
then do
st <- get
- renderedNotes <- footnoteSection (writerReferenceLocation opts)
+ renderedNotes <- footnoteSection opts (writerReferenceLocation opts)
(stEmittedNotes st + 1) (reverse notes)
modify (\st' -> st'{ stNotes = mempty,
stEmittedNotes = stEmittedNotes st' + length notes })
@@ -1084,7 +1084,8 @@ blockToHtml opts block = do
then do
notes <- if null (stNotes st)
then return mempty
- else footnoteSection (writerReferenceLocation opts) (stEmittedNotes st + 1) (reverse (stNotes st))
+ else footnoteSection opts (writerReferenceLocation opts)
+ (stEmittedNotes st + 1) (reverse (stNotes st))
modify (\st' -> st'{ stNotes = mempty, stEmittedNotes = stEmittedNotes st' + length (stNotes st') })
return (doc <> notes)
else return doc