From fb8a2540bdb91eee0ecf620b4e9d7acf3d78042f Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 30 Nov 2016 15:34:58 +0100 Subject: Options: Removed writerStandalone, made writerTemplate a Maybe. Previously setting writerStandalone = True did nothing unless a template was provided in writerTemplate. Now a fragment will be generated if writerTemplate is Nothing; otherwise, the specified template will be used and standalone output generated. [API change] --- tests/Tests/Writers/Native.hs | 2 +- tests/Tests/Writers/RST.hs | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'tests/Tests/Writers') diff --git a/tests/Tests/Writers/Native.hs b/tests/Tests/Writers/Native.hs index a8659587f..7ec43b339 100644 --- a/tests/Tests/Writers/Native.hs +++ b/tests/Tests/Writers/Native.hs @@ -8,7 +8,7 @@ import Text.Pandoc.Arbitrary() p_write_rt :: Pandoc -> Bool p_write_rt d = - read (writeNative def{ writerStandalone = True } d) == d + read (writeNative def{ writerTemplate = Just "" } d) == d p_write_blocks_rt :: [Block] -> Bool p_write_blocks_rt bs = length bs > 20 || diff --git a/tests/Tests/Writers/RST.hs b/tests/Tests/Writers/RST.hs index e07d3ffee..77dafeb4c 100644 --- a/tests/Tests/Writers/RST.hs +++ b/tests/Tests/Writers/RST.hs @@ -47,8 +47,7 @@ tests = [ testGroup "rubrics" [ "foo" , "==="] -- note: heading normalization is only done in standalone mode - , test (writeRST def{ writerStandalone = True, - writerTemplate = "$body$\n" } . toPandoc) + , test (writeRST def{ writerTemplate = Just "$body$\n" } . toPandoc) "heading levels" $ header 1 (text "Header 1") <> header 3 (text "Header 2") <> @@ -78,8 +77,7 @@ tests = [ testGroup "rubrics" , "" , "Header 2" , "--------"] - , test (writeRST def{ writerStandalone = True, - writerTemplate = "$body$\n" } . toPandoc) + , test (writeRST def{ writerTemplate = Just "$body$\n" } . toPandoc) "minimal heading levels" $ header 2 (text "Header 1") <> header 3 (text "Header 2") <> -- cgit v1.2.3