summaryrefslogtreecommitdiff
path: root/src/Text/Hakyll/CompressCSS.hs
diff options
context:
space:
mode:
authorJasper Van der Jeugt <jaspervdj@gmail.com>2010-01-11 13:56:32 +0100
committerJasper Van der Jeugt <jaspervdj@gmail.com>2010-01-11 13:56:32 +0100
commitdae0258a62a714fb7fd9b47473bf259eb858f9f1 (patch)
treede6c4480cbd87ec9e8689dcdbefeee5618c8a3ef /src/Text/Hakyll/CompressCSS.hs
parent7a765f29a2f5dcf753e5418c96a9c40ddb9112be (diff)
downloadhakyll-dae0258a62a714fb7fd9b47473bf259eb858f9f1.tar.gz
Readability++.
Diffstat (limited to 'src/Text/Hakyll/CompressCSS.hs')
-rw-r--r--src/Text/Hakyll/CompressCSS.hs12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/Text/Hakyll/CompressCSS.hs b/src/Text/Hakyll/CompressCSS.hs
index 4b35558..f9a062c 100644
--- a/src/Text/Hakyll/CompressCSS.hs
+++ b/src/Text/Hakyll/CompressCSS.hs
@@ -24,8 +24,10 @@ compressWhitespace = substituteRegex "[ \t\n][ \t\n]*" " "
-- | Function that strips CSS comments away.
stripComments :: String -> String
stripComments [] = []
-stripComments str | isPrefixOf "/*" str = stripComments $ eatComments $ drop 2 str
- | otherwise = (head str) : (stripComments $ tail str)
- where eatComments str' | null str' = []
- | isPrefixOf "*/" str' = drop 2 str'
- | otherwise = eatComments $ tail str'
+stripComments str
+ | isPrefixOf "/*" str = stripComments $ eatComments $ drop 2 str
+ | otherwise = (head str) : (stripComments $ tail str)
+ where
+ eatComments str' | null str' = []
+ | isPrefixOf "*/" str' = drop 2 str'
+ | otherwise = eatComments $ tail str'