@@ -3,10 +3,21 @@ module Text.Hakyll.CompressCSS
5import Data.List
5import Data.List
7-- | Compress CSS to speed up your site.
8-- | Compress CSS to speed up your site.
8compressCSS :: String -> String
9compressCSS :: String -> String
10+compressCSS = compressSeparators
9−compressCSS = stripComments
12+ . stripComments
14+-- | Compresses certain forms of separators.
15+compressSeparators :: String -> String
16+compressSeparators str = subRegex (mkRegex "\\s*([;:])\\s*") str "\\1"
18+-- | Compresses all whitespace.
19+compressWhitespace :: String -> String
20+compressWhitespace str = subRegex (mkRegex "\\s\\s*") str " "
11-- | Function that strips CSS comments away.
22-- | Function that strips CSS comments away.
12stripComments :: String -> String
23stripComments :: String -> String