From 2caa185504ec697b96b7bf28dd9d15d489777abf Mon Sep 17 00:00:00 2001 From: Jasper Van der Jeugt Date: Wed, 28 Nov 2012 10:24:09 +0100 Subject: Minimize , patch by Chris Mears Conflicts: tests/Hakyll/Web/Urls/Relativize/Tests.hs --- src/Hakyll/Web/Urls.hs | 3 ++- tests/Hakyll/Web/Urls/Relativize/Tests.hs | 3 +-- tests/Hakyll/Web/Urls/Tests.hs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Hakyll/Web/Urls.hs b/src/Hakyll/Web/Urls.hs index e89bd08..1cd0816 100644 --- a/src/Hakyll/Web/Urls.hs +++ b/src/Hakyll/Web/Urls.hs @@ -29,7 +29,8 @@ withUrls f = renderTags' . map tag . TS.parseTags -- renderTags' :: [TS.Tag String] -> String renderTags' = TS.renderTagsOptions TS.renderOptions - { TS.optRawTag = (`elem` ["script", "style"]) . map toLower + { TS.optRawTag = (`elem` ["script", "style"]) . map toLower + , TS.optMinimize = (`elem` ["br", "img"]) } -- | Convert a filepath to an URL starting from the site root diff --git a/tests/Hakyll/Web/Urls/Relativize/Tests.hs b/tests/Hakyll/Web/Urls/Relativize/Tests.hs index e14a2a4..802a1ca 100644 --- a/tests/Hakyll/Web/Urls/Relativize/Tests.hs +++ b/tests/Hakyll/Web/Urls/Relativize/Tests.hs @@ -9,7 +9,6 @@ module Hakyll.Web.Urls.Relativize.Tests import Test.Framework (Test, testGroup) import Test.HUnit ((@=?)) - -------------------------------------------------------------------------------- import Hakyll.Web.Urls.Relativize import TestSuite.Util @@ -21,7 +20,7 @@ tests = testGroup "Hakyll.Web.Urls.Relativize.Tests" $ fromAssertions "relativizeUrls" [ "bar" @=? relativizeUrlsWith ".." "bar" - , "" @=? + , "" @=? relativizeUrlsWith "../.." "" , "Haskell" @=? relativizeUrlsWith "../.." diff --git a/tests/Hakyll/Web/Urls/Tests.hs b/tests/Hakyll/Web/Urls/Tests.hs index 56a1838..648f308 100644 --- a/tests/Hakyll/Web/Urls/Tests.hs +++ b/tests/Hakyll/Web/Urls/Tests.hs @@ -21,8 +21,8 @@ tests = testGroup "Hakyll.Web.Urls.Tests" $ concat [ fromAssertions "withUrls" [ "bar" @=? withUrls (map toUpper) "bar" - , "" @=? - withUrls (map toUpper) "" + , "" @=? + withUrls (map toUpper) "" -- Test escaping , "" @=? -- cgit v1.2.3