aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Writers/Powerpoint.hs3
-rw-r--r--test/Tests/Writers/Powerpoint.hs2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/Powerpoint.hs b/src/Text/Pandoc/Writers/Powerpoint.hs
index 073cd72a1..e5c29b75a 100644
--- a/src/Text/Pandoc/Writers/Powerpoint.hs
+++ b/src/Text/Pandoc/Writers/Powerpoint.hs
@@ -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
diff --git a/test/Tests/Writers/Powerpoint.hs b/test/Tests/Writers/Powerpoint.hs
index 39fd1bab5..cc94f822d 100644
--- a/test/Tests/Writers/Powerpoint.hs
+++ b/test/Tests/Writers/Powerpoint.hs
@@ -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