git.iko.soy/typeable/pandoc
on master help sign in
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.

commitaa4a1d527a3ecbc291a70a872f06fa7a525d8e39 authorJohn MacFarlane <jgm@berkeley.edu> dateFri 29 Apr 2016, 14:54 (10 years ago) parent32f1b0a
1 file changed+2−3
src/Text/Pandoc/Writers/HTML.hs+2−3
src/Text/Pandoc/Writers/HTML.hs+2−3
@@ -855,13 +855,12 @@ inlineToHtml opts inline =
855855 (Note contents)
856856 | writerIgnoreNotes opts -> return mempty
857857 | otherwise -> do
858− st <- get
859− let notes = stNotes st
858+ notes <- gets stNotes
860859 let number = (length notes) + 1
861860 let ref = show number
862861 htmlContents <- blockListToNote opts ref contents
863862 -- push contents onto front of notes
864− put $ st {stNotes = (htmlContents:notes)}
863+ modify $ \st -> st {stNotes = (htmlContents:notes)}
865864 let revealSlash = ['/' | writerSlideVariant opts
866865 == RevealJsSlides]
867866 let link = H.a ! A.href (toValue $ "#" ++