Powerpoint writer: Set default slidelevel correctly.

We had previously defaulted to slideLevel 2. Now we use the correct
behavior of defaulting to the highest level header followed by
content. We change an expected test result to match this behavior.
This commit is contained in:
Jesse Rosenthal
2018-01-03 21:58:39 -05:00
parent 41dc65b37f
commit bf15258d3b
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -47,6 +47,7 @@ import Text.Pandoc.Definition
import qualified Text.Pandoc.UTF8 as UTF8
import Text.Pandoc.Class (PandocMonad)
import Text.Pandoc.Error (PandocError(..))
import Text.Pandoc.Slides (getSlideLevel)
import qualified Text.Pandoc.Class as P
import Text.Pandoc.Options
import Text.Pandoc.MIME
@@ -86,7 +87,7 @@ writePowerpoint opts (Pandoc meta blks) = do
, envOpts = opts
, envSlideLevel = case writerSlideLevel opts of
Just n -> n
Nothing -> 2
Nothing -> getSlideLevel blks'
}
runP env def $ do pres <- blocksToPresentation blks'
archv <- presentationToArchive pres
+1 -1
View File
@@ -52,7 +52,7 @@ numSlideTests = testGroup "Number of slides in output"
def
(setTitle "My Title" $ doc $ para "foo")
, testNumberOfSlides
"With h1 slide (using default slide-level)" 2
"With h1 slide (using default slide-level)" 1
def
(doc $ header 1 "Header" <> para "foo")
, testNumberOfSlides