aboutsummaryrefslogtreecommitdiff
path: root/tests/Tests/Writers/LaTeX.hs
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert+github@zeitkraut.de>2016-11-26 21:43:46 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2016-11-26 21:43:46 +0100
commitbaa25362a40fe905368f60222ebd8a533bcfe0f9 (patch)
treeece4b41a72bd97e3fb32ba838c21e709bb936de4 /tests/Tests/Writers/LaTeX.hs
parent2873cd82886d1fa557bf3abde37b5ceb3cadf40c (diff)
downloadpandoc-baa25362a40fe905368f60222ebd8a533bcfe0f9.tar.gz
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
Diffstat (limited to 'tests/Tests/Writers/LaTeX.hs')
-rw-r--r--tests/Tests/Writers/LaTeX.hs4
1 files changed, 2 insertions, 2 deletions
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 =?>