@@ -298,6 +298,8 @@ convertWithOpts opts = do
298298 return $ (varname, s) : vars
299299
300300 runIO' $ do
301+ setUserDataDir datadir
302+
301303 variables <-
302304 withList (addStringAsVariable "sourcefile")
303305 (reverse $ optInputFiles opts)
@@ -451,7 +453,6 @@ convertWithOpts opts = do
451453 mconcat <$> mapM (readFile' >=> r readerOpts) sources
452454
453455
454− setUserDataDir datadir
455456 when (readerName == "markdown_github" ||
456457 writerName == "markdown_github") $
457458 report $ Deprecated "markdown_github" "Use gfm instead."