aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/App/OutputSettings.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc/App/OutputSettings.hs')
-rw-r--r--src/Text/Pandoc/App/OutputSettings.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Text/Pandoc/App/OutputSettings.hs b/src/Text/Pandoc/App/OutputSettings.hs
index 4f33bd336..944f1b63b 100644
--- a/src/Text/Pandoc/App/OutputSettings.hs
+++ b/src/Text/Pandoc/App/OutputSettings.hs
@@ -63,7 +63,7 @@ optToOutputSettings opts = do
when (optDumpArgs opts) . liftIO $ do
UTF8.hPutStrLn stdout outputFile
- mapM_ (UTF8.hPutStrLn stdout) (optInputFiles opts)
+ mapM_ (UTF8.hPutStrLn stdout) (fromMaybe [] $ optInputFiles opts)
exitSuccess
epubMetadata <- case optEpubMetadata opts of
@@ -140,7 +140,8 @@ optToOutputSettings opts = do
variables <-
return (optVariables opts)
>>=
- setListVariableM "sourcefile" (T.pack <$> optInputFiles opts)
+ setListVariableM "sourcefile"
+ (maybe ["-"] (fmap T.pack) (optInputFiles opts))
>>=
setVariableM "outputfile" outputFile
>>=