diff options
-rw-r--r-- | src/Hakyll/Web/CompressCss.hs | 4 | ||||
-rw-r--r-- | tests/Hakyll/Web/CompressCss/Tests.hs | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/Hakyll/Web/CompressCss.hs b/src/Hakyll/Web/CompressCss.hs index 239c383..0371d8b 100644 --- a/src/Hakyll/Web/CompressCss.hs +++ b/src/Hakyll/Web/CompressCss.hs @@ -39,8 +39,8 @@ compressSeparators str | otherwise = head str : compressSeparators (drop 1 str) where isConstant = or $ map (isOfPrefix str) ["\"", "'"] - stripFirst = or $ map (isOfPrefix str) [" ", " {", " }", ";;", ";}"] - stripSecond = or $ map (isOfPrefix str) ["{ ", "} ", "; "] + stripFirst = or $ map (isOfPrefix str) [" ", " {", " }", " :", ";;", ";}"] + stripSecond = or $ map (isOfPrefix str) ["{ ", "} ", ": ", "; "] -------------------------------------------------------------------------------- -- | Compresses all whitespace. diff --git a/tests/Hakyll/Web/CompressCss/Tests.hs b/tests/Hakyll/Web/CompressCss/Tests.hs index c3fc840..b356388 100644 --- a/tests/Hakyll/Web/CompressCss/Tests.hs +++ b/tests/Hakyll/Web/CompressCss/Tests.hs @@ -51,6 +51,8 @@ tests = testGroup "Hakyll.Web.CompressCss.Tests" $ concat -- don't compress whitespace around separators in constants in the middle of a string , "abc '{ '" @=? compressCss "abc '{ '" , "abc \"{ \"" @=? compressCss "abc \"{ \"" + -- compress whitespace after colons + , "abc:xyz" @=? compressCss "abc : xyz" -- compress multiple semicolons , ";" @=? compressCss ";;;;;;;" ] |