summaryrefslogtreecommitdiff
path: root/src/Hakyll
diff options
context:
space:
mode:
Diffstat (limited to 'src/Hakyll')
-rw-r--r--src/Hakyll/Web/Urls/Relativize.hs3
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