From 5c56165555545ac8091f4d8b316a16ca8c09f975 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 3 Jul 2012 21:57:35 -0700 Subject: `-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. --- src/pandoc.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') 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" -- cgit v1.2.3