diff options
author | John MacFarlane <jgm@berkeley.edu> | 2016-04-29 14:54:54 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2016-04-29 14:54:54 -0700 |
commit | aa4a1d527a3ecbc291a70a872f06fa7a525d8e39 (patch) | |
tree | 96ccd9c473a2ce3f9f8b5979a8067681c8f21229 /src/Text | |
parent | 32f1b0a5f14c93271aaf42acaa9d06c4e59c1604 (diff) | |
download | pandoc-aa4a1d527a3ecbc291a70a872f06fa7a525d8e39.tar.gz |
HTML writer: ensure mathjax link is added when math appears in footnote.
Previously if a document only had math in a footnote,
the MathJax link would not be added.
Closes #2881.
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Writers/HTML.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs index c5b6a6db2..d8b8384e7 100644 --- a/src/Text/Pandoc/Writers/HTML.hs +++ b/src/Text/Pandoc/Writers/HTML.hs @@ -855,13 +855,12 @@ inlineToHtml opts inline = (Note contents) | writerIgnoreNotes opts -> return mempty | otherwise -> do - st <- get - let notes = stNotes st + notes <- gets stNotes let number = (length notes) + 1 let ref = show number htmlContents <- blockListToNote opts ref contents -- push contents onto front of notes - put $ st {stNotes = (htmlContents:notes)} + modify $ \st -> st {stNotes = (htmlContents:notes)} let revealSlash = ['/' | writerSlideVariant opts == RevealJsSlides] let link = H.a ! A.href (toValue $ "#" ++ |