summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlexander <ilabdsf@gmail.com>2017-08-28 17:48:46 +0300
committerJohn MacFarlane <jgm@berkeley.edu>2017-08-28 07:48:46 -0700
commit05bb8ef4aa6faa6a4da3c54a0483d42b846733ca (patch)
tree6b2a5d75a76b0f92818c9d6b29fef8f198c98f76 /test
parent8fcf66453cc4f9d1cf9413aa466477e56290d733 (diff)
RST reader: handle blank lines correctly in line blocks (#3881)
Previously pandoc would sometimes combine two line blocks separated by blanks, and ignore trailing blank lines within the line block. Test is checked to be consisted with http://rst.ninjs.org/
Diffstat (limited to 'test')
-rw-r--r--test/Tests/Readers/RST.hs13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Tests/Readers/RST.hs b/test/Tests/Readers/RST.hs
index 61a2673f5..928fc1a99 100644
--- a/test/Tests/Readers/RST.hs
+++ b/test/Tests/Readers/RST.hs
@@ -136,6 +136,19 @@ tests = [ "line block with blank line" =:
para "but must stop here")
, "line block with 3 lines" =: "| a\n| b\n| c"
=?> lineBlock ["a", "b", "c"]
+ , "line blocks with blank lines" =: T.unlines
+ [ "|"
+ , ""
+ , "|"
+ , "| a"
+ , "| b"
+ , "|"
+ , ""
+ , "|"
+ ] =?>
+ lineBlock [""] <>
+ lineBlock ["", "a", "b", ""] <>
+ lineBlock [""]
, "quoted literal block using >" =: "::\n\n> quoted\n> block\n\nOrdinary paragraph"
=?> codeBlock "> quoted\n> block" <> para "Ordinary paragraph"
, "quoted literal block using | (not a line block)" =: "::\n\n| quoted\n| block\n\nOrdinary paragraph"