summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Hakyll/Web/Urls/Relativize.hs3
-rw-r--r--tests/Hakyll/Web/Urls/Relativize/Tests.hs5
-rw-r--r--web/about.markdown9
3 files changed, 12 insertions, 5 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
diff --git a/tests/Hakyll/Web/Urls/Relativize/Tests.hs b/tests/Hakyll/Web/Urls/Relativize/Tests.hs
index 00f5a0f..465d266 100644
--- a/tests/Hakyll/Web/Urls/Relativize/Tests.hs
+++ b/tests/Hakyll/Web/Urls/Relativize/Tests.hs
@@ -17,4 +17,9 @@ tests = fromAssertions "relativizeUrls"
relativizeUrls "../.." "<img src=\"/images/lolcat.png\" />"
, "<a href=\"http://haskell.org\">Haskell</a>" @=?
relativizeUrls "../.." "<a href=\"http://haskell.org\">Haskell</a>"
+ , "<a href=\"http://haskell.org\">Haskell</a>" @=?
+ relativizeUrls "../.." "<a href=\"http://haskell.org\">Haskell</a>"
+ , "<script src=\"//ajax.googleapis.com/jquery.min.js\"></script>" @=?
+ relativizeUrls "../.."
+ "<script src=\"//ajax.googleapis.com/jquery.min.js\"></script>"
]
diff --git a/web/about.markdown b/web/about.markdown
index 90d6b1c..4b2d001 100644
--- a/web/about.markdown
+++ b/web/about.markdown
@@ -28,9 +28,10 @@ you will have to license your code under a GPL-compatible license.
Hakyll was originally written by [Jasper Van der Jeugt](http://jaspervdj.be),
who still maintains the package. Contributors:
-- [seschwar](http://github.com/seschwar)
-- [JD Marble](http://github.com/jdmarble)
-- [sargon](http://github.com/sargon)
-- [Paolo Veronelli](http://github.com/paolino)
+- [Andy Irving](https://github.com/irv)
- [Benedict Eastaugh](http://extralogical.net/)
+- [JD Marble](http://github.com/jdmarble)
- [Nicolas Wu](http://zenzike.com/)
+- [Paolo Veronelli](http://github.com/paolino)
+- [sargon](http://github.com/sargon)
+- [seschwar](http://github.com/seschwar)