summaryrefslogtreecommitdiff
path: root/src/pandoc.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/pandoc.hs')
-rw-r--r--src/pandoc.hs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/pandoc.hs b/src/pandoc.hs
index b595f7e50..3e9964130 100644
--- a/src/pandoc.hs
+++ b/src/pandoc.hs
@@ -339,6 +339,19 @@ options =
"FILENAME")
"" -- "Use custom template"
+ , Option "V" ["variable"]
+ (ReqArg
+ (\arg opt ->
+ case break (`elem` ":=") arg of
+ (k,_:v) -> do
+ let newvars = (k, v) : optVariables opt
+ return opt{ optVariables = newvars }
+ _ -> do
+ hPutStrLn stderr $ "Could not parse `" ++ arg ++ "' as a key/value pair (k=v or k:v)"
+ exitWith $ ExitFailure 17)
+ "FILENAME")
+ "" -- "Use custom template"
+
, Option "c" ["css"]
(ReqArg
(\arg opt -> do