git.iko.soy/typeable/pandoc
on master help sign in
Improved previous patch so it really solves the Windows issue.
e80116cJohn MacFarlane
src/Text/Pandoc/Shared.hs+1−2
@@ -105,7 +105,6 @@ import Network.HTTP (findHeader, rspBody,
105import Network.Browser (browse, setAllowRedirects, request)
105import Network.Browser (browse, setAllowRedirects, request)
106#ifdef EMBED_DATA_FILES
106#ifdef EMBED_DATA_FILES
107import Text.Pandoc.Data (dataFiles)
107import Text.Pandoc.Data (dataFiles)
108−import System.FilePath ( joinPath )
109#else
108#else
110import Paths_pandoc (getDataFileName)
109import Paths_pandoc (getDataFileName)
111#endif
110#endif
@@ -526,7 +525,7 @@ readDefaultDataFile fname =
526 Nothing -> ioError $ userError
525 Nothing -> ioError $ userError
527 $ "Data file `" ++ fname ++ "' does not exist"
526 $ "Data file `" ++ fname ++ "' does not exist"
528 Just contents -> return contents
527 Just contents -> return contents
529− where makeCanonical = joinPath . transformPathParts . splitBy (=='/')
528+ where makeCanonical = intercalate "/" . transformPathParts . splitBy (=='/')
530 transformPathParts = reverse . foldl go []
529 transformPathParts = reverse . foldl go []
531 go as "." = as
530 go as "." = as
532 go (_:as) ".." = as
531 go (_:as) ".." = as