aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/App
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc/App')
-rw-r--r--src/Text/Pandoc/App/CommandLineOptions.hs12
-rw-r--r--src/Text/Pandoc/App/Opt.hs2
2 files changed, 13 insertions, 1 deletions
diff --git a/src/Text/Pandoc/App/CommandLineOptions.hs b/src/Text/Pandoc/App/CommandLineOptions.hs
index 6ae167ebf..be93357cb 100644
--- a/src/Text/Pandoc/App/CommandLineOptions.hs
+++ b/src/Text/Pandoc/App/CommandLineOptions.hs
@@ -643,7 +643,17 @@ options =
"NUMBER")
"" -- "Header level at which to split chapters in EPUB"
- , Option "" ["pdf-engine"]
+ , Option "" ["ipynb-output"]
+ (ReqArg
+ (\arg opt ->
+ if arg `notElem` ["all","none","best"]
+ then E.throwIO $ PandocOptionError $
+ "ipynb-output must be all, none, or best"
+ else return opt { optIpynbOutput = arg })
+ "all|none|best")
+ "" -- "Starting number for sections, subsections, etc."
+
+ , Option "" ["pdf-engine"]
(ReqArg
(\arg opt -> do
let b = takeBaseName arg
diff --git a/src/Text/Pandoc/App/Opt.hs b/src/Text/Pandoc/App/Opt.hs
index 698fdc96b..59405cbeb 100644
--- a/src/Text/Pandoc/App/Opt.hs
+++ b/src/Text/Pandoc/App/Opt.hs
@@ -123,6 +123,7 @@ data Opt = Opt
, optFileScope :: Bool -- ^ Parse input files before combining
, optTitlePrefix :: Maybe String -- ^ Prefix for title
, optCss :: [FilePath] -- ^ CSS files to link to
+ , optIpynbOutput :: String -- ^ Maybe f to use best data; Nothing to omit
, optIncludeBeforeBody :: [FilePath] -- ^ Files to include before
, optIncludeAfterBody :: [FilePath] -- ^ Files to include after body
, optIncludeInHeader :: [FilePath] -- ^ Files to include in header
@@ -196,6 +197,7 @@ defaultOpts = Opt
, optFileScope = False
, optTitlePrefix = Nothing
, optCss = []
+ , optIpynbOutput = "best"
, optIncludeBeforeBody = []
, optIncludeAfterBody = []
, optIncludeInHeader = []