From 4ad9360a97e9ccea98eec64c647ab3bd22bcb5dd Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 28 Mar 2011 16:54:37 -0700 Subject: Fixed bug in footnote order in HTML. CircleCode pointed out that the following markdown produces out-of-order footnote markers in HTML: -8<------------------------ some text^[with a footnote which will be #1] issue some other text^[with a footnote which will be #2] -8<------------------------ This fixes the problem. --- src/Text/Pandoc/Writers/HTML.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs index b3320fa06..0b791687f 100644 --- a/src/Text/Pandoc/Writers/HTML.hs +++ b/src/Text/Pandoc/Writers/HTML.hs @@ -235,9 +235,9 @@ elementToListItem opts (Sec _ num id' headerText subsecs) = do elementToHtml :: WriterOptions -> Element -> State WriterState Html elementToHtml opts (Blk block) = blockToHtml opts block elementToHtml opts (Sec level num id' title' elements) = do - innerContents <- mapM (elementToHtml opts) elements modify $ \st -> st{stSecNum = num} -- update section number header' <- blockToHtml opts (Header level title') + innerContents <- mapM (elementToHtml opts) elements let slides = writerSlideVariant opts `elem` [SlidySlides, S5Slides] let header'' = header' ! [prefixedId opts id' | not (writerStrictMarkdown opts || -- cgit v1.2.3