From baa25362a40fe905368f60222ebd8a533bcfe0f9 Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Sat, 26 Nov 2016 21:43:46 +0100 Subject: Allow to overwrite top-level division type heuristics (#3258) Pandoc uses heuristics to determine the most resonable top-level division type when emitting LaTeX or Docbook markup. It is now possible to overwrite this implicitly set top-level division via the `top-level-division` command line parameter. API change (`Text.Pandoc.Options`): the type of the `writerTopLevelDivision` field in of the `WriterOptions` data type is altered from `Division` to `Maybe Division`. The field's default value is changed from `Section` to `Nothing`. Closes: #3197 --- tests/Tests/Writers/LaTeX.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/Tests/Writers/LaTeX.hs') diff --git a/tests/Tests/Writers/LaTeX.hs b/tests/Tests/Writers/LaTeX.hs index 28d6618c1..fb230e89a 100644 --- a/tests/Tests/Writers/LaTeX.hs +++ b/tests/Tests/Writers/LaTeX.hs @@ -90,11 +90,11 @@ tests = [ testGroup "code blocks" latexTopLevelDiv :: (ToPandoc a) => Division -> a -> String latexTopLevelDiv division = - latexWithOpts def{ writerTopLevelDivision = division } + latexWithOpts def{ writerTopLevelDivision = Just division } beamerTopLevelDiv :: (ToPandoc a) => Division -> a -> String beamerTopLevelDiv division = - latexWithOpts def { writerTopLevelDivision = division + latexWithOpts def { writerTopLevelDivision = Just division , writerBeamer = True } in [ test (latexTopLevelDiv Section) "sections as top-level" $ headers =?> -- cgit v1.2.3