diff options
author | John MacFarlane <jgm@berkeley.edu> | 2011-03-28 16:54:37 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2011-03-28 16:54:37 -0700 |
commit | 4ad9360a97e9ccea98eec64c647ab3bd22bcb5dd (patch) | |
tree | a3f2ea2b00459c7397531a1f8d1847388b2f2f15 /src/Text/Pandoc | |
parent | 69b0c15030d78827efada08aae608637263c43c9 (diff) | |
download | pandoc-4ad9360a97e9ccea98eec64c647ab3bd22bcb5dd.tar.gz |
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.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Writers/HTML.hs | 2 |
1 files changed, 1 insertions, 1 deletions
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 || |