diff options
| author | Jasper Van der Jeugt <m@jaspervdj.be> | 2011-10-03 09:44:37 +0200 |
|---|---|---|
| committer | Jasper Van der Jeugt <m@jaspervdj.be> | 2011-10-03 09:44:37 +0200 |
| commit | c015be003ead11000b84f70ae5bcc2708b04c3f8 (patch) | |
| tree | d51cebe1b6c985d5a41b14423de86a7bddc0dc7f /src | |
| parent | c8a970d64bdddc1e8655ac1ebf5d028d1bf6a021 (diff) | |
| download | hakyll-c015be003ead11000b84f70ae5bcc2708b04c3f8.tar.gz | |
Add test for new relativizeUrls
Diffstat (limited to 'src')
| -rw-r--r-- | src/Hakyll/Web/Urls/Relativize.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Hakyll/Web/Urls/Relativize.hs b/src/Hakyll/Web/Urls/Relativize.hs index 0b7df4e..c473097 100644 --- a/src/Hakyll/Web/Urls/Relativize.hs +++ b/src/Hakyll/Web/Urls/Relativize.hs @@ -44,4 +44,5 @@ relativizeUrls :: String -- ^ Path to the site root -> String -- ^ Resulting HTML relativizeUrls root = withUrls rel where - rel x = if "/" `isPrefixOf` x && not ("//" `isPrefixOf` x) then root ++ x else x + isRel x = "/" `isPrefixOf` x && not ("//" `isPrefixOf` x) + rel x = if isRel x then root ++ x else x |
