@@ -51,13 +51,21 @@ import Text.Pandoc.Options (WriterOptions(..))
51import Text.Pandoc.MIME (extensionFromMimeType)
51import Text.Pandoc.MIME (extensionFromMimeType)
52import Text.Pandoc.Process (pipeProcess)
52import Text.Pandoc.Process (pipeProcess)
53import qualified Data.ByteString.Lazy as BL
53import qualified Data.ByteString.Lazy as BL
55+import Data.List (intercalate)
55withTempDir :: String -> (FilePath -> IO a) -> IO a
58withTempDir :: String -> (FilePath -> IO a) -> IO a
56−withTempDir =
59+withTempDir f =
57#ifdef _WINDOWS
60#ifdef _WINDOWS
58− withTempDirectory "."
61+ withTempDirectory "." (f . changePathSeparators)
60− withSystemTempDirectory
63+ withSystemTempDirectory f
67+changePathSeparators :: FilePath -> FilePath
68+changePathSeparators = intercalate "/" . splitDirectories
63makePDF :: String -- ^ pdf creator (pdflatex, lualatex, xelatex)
71makePDF :: String -- ^ pdf creator (pdflatex, lualatex, xelatex)