git.iko.soy/typeable/pandoc
on master help sign in
App: reverse optInputFiles so they come out in right order in templates.
commit737d954a59fb8a783d4eb6462c9e11b9e1d07402 authorJohn MacFarlane <jgm@berkeley.edu> dateSat 25 Feb 2017, 23:47 (10 years ago) parent4aed13b
1 file changed+5−1
src/Text/Pandoc/App.hs+5−1
src/Text/Pandoc/App.hs+5−1
@@ -233,7 +233,11 @@ convertWithOpts opts = do
233233 (\vars -> return $ ("outputfile", optOutputFile opts) : vars)
234234 >>=
235235 withList (addStringAsVariable "sourcefile")
236− (optInputFiles opts)
236+ (reverse $ optInputFiles opts)
237+ -- we reverse this list because, unlike
238+ -- the other option lists here, it is
239+ -- not reversed when parsed from CLI arguments.
240+ -- See withList, above.
237241 >>=
238242 withList (addContentsAsVariable "include-before")
239243 (optIncludeBeforeBody opts)