git.iko.soy/typeable/pandoc
on master help sign in
Workaround for problem with file-embed.
84ed0f0John MacFarlane
src/Text/Pandoc/Shared.hs+3−1
@@ -512,10 +512,12 @@ dataFiles = $(embedDir "data")
512readDefaultDataFile :: FilePath -> IO B.ByteString
512readDefaultDataFile :: FilePath -> IO B.ByteString
513readDefaultDataFile fname =
513readDefaultDataFile fname =
514#ifdef EMBED_DATA_FILES
514#ifdef EMBED_DATA_FILES
515− case lookup fname dataFiles of
515+ case lookup (map backToForwardSlash fname) dataFiles of
516 Nothing -> ioError $ userError
516 Nothing -> ioError $ userError
517 $ "Data file `" ++ fname ++ "' does not exist"
517 $ "Data file `" ++ fname ++ "' does not exist"
518 Just contents -> return contents
518 Just contents -> return contents
519+ where backToForwardSlash '\\' = '/'
520+ backToForwardSlash c = c
519#else
521#else
520 getDataFileName ("data" </> fname) >>= B.readFile
522 getDataFileName ("data" </> fname) >>= B.readFile
521#endif
523#endif