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.
This commit is contained in:
John MacFarlane 2011-03-28 16:54:37 -07:00
parent 69b0c15030
commit 4ad9360a97

View file

@ -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 ||