diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-08-12 12:15:40 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-08-12 12:15:40 -0700 |
commit | b6e0add76aa2479fde9696f1ab25c1101de4de31 (patch) | |
tree | 58b4806552b6257f2a9b5ae425009d2621a47ce1 /src/Text | |
parent | 467ca2a1adc9c90541930405f3b78b7c501fd67a (diff) | |
download | pandoc-b6e0add76aa2479fde9696f1ab25c1101de4de31.tar.gz |
Set user data dir at beginning, so readDataFile has access to it.
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/App.hs | 3 |
1 files changed, 2 insertions, 1 deletions
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." |