diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-12-01 13:21:05 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-12-01 13:21:05 -0800 |
commit | 704cfc1e3c2b6bc97cc315c92671dc47e9c76977 (patch) | |
tree | 673f548e203baea598906b4fda02736152eb7caf /tests/Tests/Readers/RST.hs | |
parent | 4d296f70dfcbe75ec155809e115565c0a5fe4fb2 (diff) | |
parent | 74c1b547c247bbe2adab0fc6857cd78eaef918c3 (diff) | |
download | pandoc-704cfc1e3c2b6bc97cc315c92671dc47e9c76977.tar.gz |
Merge pull request #1781 from bergey/rst
parse RST quoted literal blocks and class directives
Diffstat (limited to 'tests/Tests/Readers/RST.hs')
-rw-r--r-- | tests/Tests/Readers/RST.hs | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/tests/Tests/Readers/RST.hs b/tests/Tests/Readers/RST.hs index a80dc32b7..c97dcb149 100644 --- a/tests/Tests/Readers/RST.hs +++ b/tests/Tests/Readers/RST.hs @@ -67,5 +67,26 @@ tests = [ "line block with blank line" =: link "http://foo.bar.baz" "" "http://foo.bar.baz" <> ". " <> link "http://foo.bar/baz_(bam)" "" "http://foo.bar/baz_(bam)" <> " (" <> link "http://foo.bar" "" "http://foo.bar" <> ")") + , "indented literal block" =: unlines + [ "::" + , "" + , " block quotes" + , "" + , " can go on for many lines" + , "but must stop here"] + =?> (doc $ + codeBlock "block quotes\n\ncan go on for many lines" <> + para "but must stop here") + , "line block with 3 lines" =: "| a\n| b\n| c" + =?> para ("a" <> linebreak <> "b" <> linebreak <> "c") + , "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" + =?> codeBlock "| quoted\n| block" <> para "Ordinary paragraph" + , "class directive with single paragraph" =: ".. class:: special\n\nThis is a \"special\" paragraph." + =?> divWith ("", ["special"], []) (para "This is a \"special\" paragraph.") + , "class directive with two paragraphs" =: ".. class:: exceptional remarkable\n\n First paragraph.\n\n Second paragraph." + =?> divWith ("", ["exceptional", "remarkable"], []) (para "First paragraph." <> para "Second paragraph.") + , "class directive around literal block" =: ".. class:: classy\n\n::\n\n a\n b" + =?> divWith ("", ["classy"], []) (codeBlock "a\nb") ] - |