1module Text.Hakyll.CompressCSS
8-- | Compress CSS to speed up your site.
9compressCSS :: String -> String
10compressCSS = compressSeparators
14-- | Compresses certain forms of separators.
15compressSeparators :: String -> String
16compressSeparators str = subRegex (mkRegex "\\s*([;:])\\s*") str "\\1"
18-- | Compresses all whitespace.
19compressWhitespace :: String -> String
20compressWhitespace str = subRegex (mkRegex "\\s\\s*") str " "
22-- | Function that strips CSS comments away.
23stripComments :: String -> String
25stripComments str | isPrefixOf "/*" str = stripComments $ eatComments $ drop 2 str
26 | otherwise = (head str) : (stripComments $ tail str)
27 where eatComments str' | null str' = []
28 | isPrefixOf "*/" str' = drop 2 str'
29 | otherwise = eatComments $ tail str'
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list