git.iko.soy/typeable/pandoc
on master help sign in
Use `codeBlockWith`
d7bc8c0Sidharth Kapur
tests/Tests/Readers/RST.hs+6−6
@@ -8,7 +8,6 @@ import Tests.Arbitrary()
8import Text.Pandoc.Builder
8import Text.Pandoc.Builder
9import Text.Pandoc
9import Text.Pandoc
10import Text.Pandoc.Error
10import Text.Pandoc.Error
11−import qualified Data.Sequence as Seq
12
11
13rst :: String -> Pandoc
12rst :: String -> Pandoc
14rst = handleError . readRST def{ readerStandalone = True }
13rst = handleError . readRST def{ readerStandalone = True }
@@ -103,11 +102,12 @@ tests = [ "line block with blank line" =:
103 , " def func(x):"
102 , " def func(x):"
104 , " return y"
103 , " return y"
105 ] =?>
104 ] =?>
106− ( doc . Many . Seq.singleton $
105+ ( doc $ codeBlockWith
107− CodeBlock ( ""
106+ ( ""
108− , ["sourceCode", "python", "numberLines", "class1", "class2", "class3"]
107+ , ["sourceCode", "python", "numberLines", "class1", "class2", "class3"]
109− , [ ("startFrom", "34") ]
108+ , [ ("startFrom", "34") ]
109+ )
110− ) "def func(x):\n return y"
110+ "def func(x):\n return y"
111 )
111 )
112 , testGroup "literal / line / code blocks"
112 , testGroup "literal / line / code blocks"
113 [ "indented literal block" =: unlines
113 [ "indented literal block" =: unlines