aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Shared.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Shared.hs b/src/Text/Pandoc/Shared.hs
index 7bd35b138..8626a91c7 100644
--- a/src/Text/Pandoc/Shared.hs
+++ b/src/Text/Pandoc/Shared.hs
@@ -512,10 +512,12 @@ dataFiles = $(embedDir "data")
readDefaultDataFile :: FilePath -> IO B.ByteString
readDefaultDataFile fname =
#ifdef EMBED_DATA_FILES
- case lookup fname dataFiles of
+ case lookup (map backToForwardSlash fname) dataFiles of
Nothing -> ioError $ userError
$ "Data file `" ++ fname ++ "' does not exist"
Just contents -> return contents
+ where backToForwardSlash '\\' = '/'
+ backToForwardSlash c = c
#else
getDataFileName ("data" </> fname) >>= B.readFile
#endif