git.iko.soy/typeable/pandoc
on master help sign in
Set user data dir at beginning, so readDataFile has access to it.
b6e0addJohn MacFarlane
src/Text/Pandoc/App.hs+2−1
@@ -298,6 +298,8 @@ convertWithOpts opts = do
298 return $ (varname, s) : vars
298 return $ (varname, s) : vars
299
299
300 runIO' $ do
300 runIO' $ do
301+ setUserDataDir datadir
302+
301 variables <-
303 variables <-
302 withList (addStringAsVariable "sourcefile")
304 withList (addStringAsVariable "sourcefile")
303 (reverse $ optInputFiles opts)
305 (reverse $ optInputFiles opts)
@@ -451,7 +453,6 @@ convertWithOpts opts = do
451 mconcat <$> mapM (readFile' >=> r readerOpts) sources
453 mconcat <$> mapM (readFile' >=> r readerOpts) sources
452
454
453
455
454− setUserDataDir datadir
455 when (readerName == "markdown_github" ||
456 when (readerName == "markdown_github" ||
456 writerName == "markdown_github") $
457 writerName == "markdown_github") $
457 report $ Deprecated "markdown_github" "Use gfm instead."
458 report $ Deprecated "markdown_github" "Use gfm instead."