aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Data.hsb
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc/Data.hsb')
-rw-r--r--src/Text/Pandoc/Data.hsb10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Data.hsb b/src/Text/Pandoc/Data.hsb
index 3a0bf8ac4..d408bf510 100644
--- a/src/Text/Pandoc/Data.hsb
+++ b/src/Text/Pandoc/Data.hsb
@@ -2,6 +2,14 @@
-- to be processed using hsb2hs
module Text.Pandoc.Data (dataFiles) where
import qualified Data.ByteString as B
+import System.FilePath (splitDirectories)
+import qualified System.FilePath.Posix as Posix
+-- We ensure that the data files are stored using Posix
+-- path separators (/), even on Windows.
dataFiles :: [(FilePath, B.ByteString)]
-dataFiles = ("README", %blob "README") : %blobs "data" \ No newline at end of file
+dataFiles = map (\(fp, contents) ->
+ (Posix.joinPath (splitDirectories fp), contents)) dataFiles'
+
+dataFiles' :: [(FilePath, B.ByteString)]
+dataFiles' = ("README", %blob "README") : %blobs "data"