aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MANUAL.txt2
-rw-r--r--src/Text/Pandoc/App/Opt.hs7
2 files changed, 5 insertions, 4 deletions
diff --git a/MANUAL.txt b/MANUAL.txt
index ef737c452..4c03cc6d7 100644
--- a/MANUAL.txt
+++ b/MANUAL.txt
@@ -1433,7 +1433,7 @@ to: html5
# leave blank for output to stdout:
output-file:
-# leave blank for input from stdin:
+# leave blank for input from stdin, use [] for no input:
input-files:
- preface.md
- content.md
diff --git a/src/Text/Pandoc/App/Opt.hs b/src/Text/Pandoc/App/Opt.hs
index ed167fff2..09f018233 100644
--- a/src/Text/Pandoc/App/Opt.hs
+++ b/src/Text/Pandoc/App/Opt.hs
@@ -202,15 +202,16 @@ doOpt (k',v) = do
"input-files" ->
parseYAML v >>= \x -> return (\o -> o{ optInputFiles =
optInputFiles o <>
- Just (map unpack x) })
+ (map unpack <$> x) })
"input-file" -> -- allow either a list or a single value
(parseYAML v >>= \x -> return (\o -> o{ optInputFiles =
optInputFiles o <>
- Just (map unpack x) }))
+ (map unpack <$> x) }))
<|>
(parseYAML v >>= \x -> return (\o -> o{ optInputFiles =
optInputFiles o <>
- Just [unpack x] }))
+ ((\z -> [unpack z]) <$> x)
+ }))
"number-sections" ->
parseYAML v >>= \x -> return (\o -> o{ optNumberSections = x })
"number-offset" ->