aboutsummaryrefslogtreecommitdiff
path: root/test/Tests/Readers
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2017-10-08 14:17:26 +0200
committerAlbert Krewinkel <albert@zeitkraut.de>2017-10-08 14:17:26 +0200
commitf176ad6f21aa02884f628082c05eecb76816d014 (patch)
tree6cad8512dd4aeeaa715f3396332b7f239e1a60a1 /test/Tests/Readers
parent89f136266037ae1f25277a50c1fab42c28a92c47 (diff)
downloadpandoc-f176ad6f21aa02884f628082c05eecb76816d014.tar.gz
Org reader: end footnotes after two blank lines
Footnotes can not only be terminated by the start of a new footnote or a header, but also by two consecutive blank lines.
Diffstat (limited to 'test/Tests/Readers')
-rw-r--r--test/Tests/Readers/Org.hs133
1 files changed, 74 insertions, 59 deletions
diff --git a/test/Tests/Readers/Org.hs b/test/Tests/Readers/Org.hs
index b714c0792..567d63bd5 100644
--- a/test/Tests/Readers/Org.hs
+++ b/test/Tests/Readers/Org.hs
@@ -1086,67 +1086,82 @@ tests =
para (image "guess.jpg" "fig:" "")
]
- , "Footnote" =:
- T.unlines [ "A footnote[1]"
- , ""
- , "[1] First paragraph"
- , ""
- , "second paragraph"
- ] =?>
- para (mconcat
- [ "A", space, "footnote"
- , note $ mconcat [ para ("First" <> space <> "paragraph")
- , para ("second" <> space <> "paragraph")
- ]
- ])
-
- , "Two footnotes" =:
- T.unlines [ "Footnotes[fn:1][fn:2]"
- , ""
- , "[fn:1] First note."
- , ""
- , "[fn:2] Second note."
- ] =?>
- para (mconcat
- [ "Footnotes"
- , note $ para ("First" <> space <> "note.")
- , note $ para ("Second" <> space <> "note.")
- ])
-
- , "Emphasized text before footnote" =:
- T.unlines [ "/text/[fn:1]"
- , ""
- , "[fn:1] unicorn"
- ] =?>
- para (mconcat
- [ emph "text"
- , note . para $ "unicorn"
- ])
-
- , "Footnote that starts with emphasized text" =:
- T.unlines [ "text[fn:1]"
- , ""
- , "[fn:1] /emphasized/"
- ] =?>
- para (mconcat
- [ "text"
- , note . para $ emph "emphasized"
- ])
+ , testGroup "Footnotes"
+ [ "Footnote" =:
+ T.unlines [ "A footnote[1]"
+ , ""
+ , "[1] First paragraph"
+ , ""
+ , "second paragraph"
+ ] =?>
+ para (mconcat
+ [ "A", space, "footnote"
+ , note $ mconcat [ para ("First" <> space <> "paragraph")
+ , para ("second" <> space <> "paragraph")
+ ]
+ ])
- , "Footnote followed by header" =:
- T.unlines [ "Another note[fn:yay]"
- , ""
- , "[fn:yay] This is great!"
- , ""
- , "** Headline"
- ] =?>
- mconcat
- [ para (mconcat
- [ "Another", space, "note"
- , note $ para ("This" <> space <> "is" <> space <> "great!")
+ , "Two footnotes" =:
+ T.unlines [ "Footnotes[fn:1][fn:2]"
+ , ""
+ , "[fn:1] First note."
+ , ""
+ , "[fn:2] Second note."
+ ] =?>
+ para (mconcat
+ [ "Footnotes"
+ , note $ para ("First" <> space <> "note.")
+ , note $ para ("Second" <> space <> "note.")
])
- , headerWith ("headline", [], []) 2 "Headline"
- ]
+
+ , "Emphasized text before footnote" =:
+ T.unlines [ "/text/[fn:1]"
+ , ""
+ , "[fn:1] unicorn"
+ ] =?>
+ para (mconcat
+ [ emph "text"
+ , note . para $ "unicorn"
+ ])
+
+ , "Footnote that starts with emphasized text" =:
+ T.unlines [ "text[fn:1]"
+ , ""
+ , "[fn:1] /emphasized/"
+ ] =?>
+ para (mconcat
+ [ "text"
+ , note . para $ emph "emphasized"
+ ])
+
+ , "Footnote followed by header" =:
+ T.unlines [ "Another note[fn:yay]"
+ , ""
+ , "[fn:yay] This is great!"
+ , ""
+ , "** Headline"
+ ] =?>
+ mconcat
+ [ para (mconcat
+ [ "Another", space, "note"
+ , note $ para ("This" <> space <> "is" <> space <> "great!")
+ ])
+ , headerWith ("headline", [], []) 2 "Headline"
+ ]
+
+ , "Footnote followed by two blank lines" =:
+ T.unlines [ "footnote[fn:blanklines]"
+ , ""
+ , "[fn:blanklines] followed by blank lines"
+ , ""
+ , ""
+ , "next"
+ ] =?>
+ mconcat
+ [ para ("footnote" <> note (para "followed by blank lines"))
+ , para "next"
+ ]
+ ]
]
, testGroup "Lists" $