From b6e0add76aa2479fde9696f1ab25c1101de4de31 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 12 Aug 2017 12:15:40 -0700 Subject: [PATCH] Set user data dir at beginning, so readDataFile has access to it. --- src/Text/Pandoc/App.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Text/Pandoc/App.hs b/src/Text/Pandoc/App.hs index 99d9aa4cb..938bb91e0 100644 --- a/src/Text/Pandoc/App.hs +++ b/src/Text/Pandoc/App.hs @@ -298,6 +298,8 @@ convertWithOpts opts = do return $ (varname, s) : vars runIO' $ do + setUserDataDir datadir + variables <- withList (addStringAsVariable "sourcefile") (reverse $ optInputFiles opts) @@ -451,7 +453,6 @@ convertWithOpts opts = do mconcat <$> mapM (readFile' >=> r readerOpts) sources - setUserDataDir datadir when (readerName == "markdown_github" || writerName == "markdown_github") $ report $ Deprecated "markdown_github" "Use gfm instead."