From 699d289cc5913c3cb0ec7b1b3d7ae767cbe55339 Mon Sep 17 00:00:00 2001 From: Roland Hieber Date: Sat, 25 Feb 2017 23:15:56 +0100 Subject: Add `sourcefile` and `outputfile` template variables (#3439) Closes #3431. --- src/Text/Pandoc/App.hs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/Text') diff --git a/src/Text/Pandoc/App.hs b/src/Text/Pandoc/App.hs index 1a41050d7..9d8fc592b 100644 --- a/src/Text/Pandoc/App.hs +++ b/src/Text/Pandoc/App.hs @@ -230,6 +230,11 @@ convertWithOpts opts = do variables <- return (optVariables opts) >>= + (\vars -> return $ ("outputfile", optOutputFile opts) : vars) + >>= + withList (addStringAsVariable "sourcefile") + (optInputFiles opts) + >>= withList (addContentsAsVariable "include-before") (optIncludeBeforeBody opts) >>= -- cgit v1.2.3