diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2012-07-03 21:57:35 -0700 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2012-07-03 21:59:46 -0700 |
commit | 5c56165555545ac8091f4d8b316a16ca8c09f975 (patch) | |
tree | 4fa0aee57adb05cd34019bb2a4cafd62f18d7864 /src/pandoc.hs | |
parent | a5db4246656afae3541936269e727d9a9cc39795 (diff) |
`-V` option: Add variables to beginning of list, not end.
This means that duplicate variables specified later on the command
line take precedence.
It also allows the default `-slidy-url` to be overridden even when
`--self-contained` is used (provided the `-V` comes after
`--self-contained`. Previously this could not be done. Note
that when `--self-contained` is used, the `slidy-url` variable is
set to `slidy` so that local copies are used.
Diffstat (limited to 'src/pandoc.hs')
-rw-r--r-- | src/pandoc.hs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/pandoc.hs b/src/pandoc.hs index 0eb64c9ba..2f85906d5 100644 --- a/src/pandoc.hs +++ b/src/pandoc.hs @@ -315,8 +315,7 @@ options = let (key,val) = case break (`elem` ":=") arg of (k,_:v) -> (k,v) (k,_) -> (k,"true") - let newvars = optVariables opt ++ [(key,val)] - return opt{ optVariables = newvars }) + return opt{ optVariables = (key,val) : optVariables opt }) "KEY[:VALUE]") "" -- "Use custom template" |