@@ -84,6 +84,7 @@ module Text.Pandoc.Shared (
84 -- * File handling
84 -- * File handling
85 inDirectory,
85 inDirectory,
86 collapseFilePath,
86 collapseFilePath,
87 filteredFilesFromArchive,
88 filteredFilesFromArchive,
88 -- * URI handling
89 -- * URI handling
@@ -635,6 +636,19 @@ collapseFilePath = Posix.joinPath . reverse . foldl go [] . splitDirectories
635 isSingleton _ = Nothing
636 isSingleton _ = Nothing
636 checkPathSeperator = fmap isPathSeparator . isSingleton
637 checkPathSeperator = fmap isPathSeparator . isSingleton
639+-- Convert the path part of a file: URI to a regular path.
640+-- On windows, @/c:/foo@ should be @c:/foo@.
641+-- On linux, @/foo@ should be @/foo@.
642+uriPathToPath :: String -> FilePath
639-- File selection from the archive
653-- File selection from the archive