@@ -383,6 +383,48 @@ tests =
383383 ] =?>
384384 para (image "the-red-queen.jpg" "fig:redqueen"
385385 "Used as a metapher in evolutionary biology.")
386+
387+ , "Footnote" =:
388+ unlines [ "A footnote[1]"
389+ , ""
390+ , "[1] First paragraph"
391+ , ""
392+ , "second paragraph"
393+ ] =?>
394+ para (mconcat
395+ [ "A", space, "footnote"
396+ , note $ mconcat [ para ("First" <> space <> "paragraph")
397+ , para ("second" <> space <> "paragraph")
398+ ]
399+ ])
400+
401+ , "Two footnotes" =:
402+ unlines [ "Footnotes[fn:1][fn:2]"
403+ , ""
404+ , "[fn:1] First note."
405+ , ""
406+ , "[fn:2] Second note."
407+ ] =?>
408+ para (mconcat
409+ [ "Footnotes"
410+ , note $ para ("First" <> space <> "note.")
411+ , note $ para ("Second" <> space <> "note.")
412+ ])
413+
414+ , "Footnote followed by header" =:
415+ unlines [ "Another note[fn:yay]"
416+ , ""
417+ , "[fn:yay] This is great!"
418+ , ""
419+ , "** Headline"
420+ ] =?>
421+ mconcat
422+ [ para (mconcat
423+ [ "Another", space, "note"
424+ , note $ para ("This" <> space <> "is" <> space <> "great!")
425+ ])
426+ , header 2 "Headline"
427+ ]
386428 ]
387429
388430 , testGroup "Lists" $