From c0b68b2030ecdb4ad006443a56ce99aebc92fbc5 Mon Sep 17 00:00:00 2001
From: John MacFarlane <jgm@berkeley.edu>
Date: Sun, 8 Aug 2021 11:20:26 -0700
Subject: Allow `--slide-level=0`.

When the slide level is set to 0, headings won't be used at all
in splitting the document into slides. Horizontal rules must be
used to separate slides.

Closes #7476.
---
 src/Text/Pandoc/App/CommandLineOptions.hs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src')

diff --git a/src/Text/Pandoc/App/CommandLineOptions.hs b/src/Text/Pandoc/App/CommandLineOptions.hs
index a6df12715..d2c12573c 100644
--- a/src/Text/Pandoc/App/CommandLineOptions.hs
+++ b/src/Text/Pandoc/App/CommandLineOptions.hs
@@ -576,10 +576,10 @@ options =
                  (ReqArg
                   (\arg opt ->
                       case safeStrRead arg of
-                           Just t | t >= 1 && t <= 6 ->
+                           Just t | t >= 0 && t <= 6 ->
                                     return opt { optSlideLevel = Just t }
                            _      -> E.throwIO $ PandocOptionError
-                                    "slide level must be a number between 1 and 6")
+                                    "slide level must be a number between 0 and 6")
                  "NUMBER")
                  "" -- "Force header level for slides"
 
-- 
cgit v1.2.3