aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/App.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Text/Pandoc/App.hs b/src/Text/Pandoc/App.hs
index 9d8fc592b..8c11a0ff7 100644
--- a/src/Text/Pandoc/App.hs
+++ b/src/Text/Pandoc/App.hs
@@ -233,7 +233,11 @@ convertWithOpts opts = do
(\vars -> return $ ("outputfile", optOutputFile opts) : vars)
>>=
withList (addStringAsVariable "sourcefile")
- (optInputFiles opts)
+ (reverse $ optInputFiles opts)
+ -- we reverse this list because, unlike
+ -- the other option lists here, it is
+ -- not reversed when parsed from CLI arguments.
+ -- See withList, above.
>>=
withList (addContentsAsVariable "include-before")
(optIncludeBeforeBody opts)