diff options
Diffstat (limited to 'Utils.hs')
| -rw-r--r-- | Utils.hs | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -28,7 +28,7 @@ import System.Directory , doesDirectoryExist , getDirectoryContents ) -import System.FilePath ((</>), splitDirectories, takeDirectory) +import System.FilePath (splitDirectories, takeDirectory) import Text.Pandoc.Definition import qualified Text.Pandoc.Walk import Types @@ -96,6 +96,16 @@ unAbsolute = dropWhile (== '/') withPandocBlocks :: ([Block] -> [Block]) -> Pandoc -> Pandoc withPandocBlocks f (Pandoc meta blocks) = Pandoc meta (f blocks) +infixr 5 </> + +a </> b@('/':_) = + error + $ "internal error: unchecked concatenation of absolute path: " + ++ a + ++ " </> " + ++ b +a </> b = (System.FilePath.</>) a b + -- | Get all contents of a directory. (Interned from Hakyll.) getRecursiveContents :: (FilePath -> IO Bool) -- ^ Ignore this file/directory |
