summaryrefslogtreecommitdiff
path: root/src/Hakyll
diff options
context:
space:
mode:
authorIvan N. Veselov <veselov@gmail.com>2012-08-02 16:13:07 +0300
committerIvan N. Veselov <veselov@gmail.com>2012-08-02 16:13:07 +0300
commite3b2d07756e749a4910b434226a70fc1ad5a0e63 (patch)
tree46e717f9568c7ea7bb506c3a6b49ee24ba2bc985 /src/Hakyll
parentbc8821fa82614c1fff0e7ff0c296b4dab6f3d6a6 (diff)
downloadhakyll-e3b2d07756e749a4910b434226a70fc1ad5a0e63.tar.gz
Added proper handling of windows newlines during whitespace compression of CSS files. Simpified several regexps.
Diffstat (limited to 'src/Hakyll')
-rw-r--r--src/Hakyll/Web/CompressCss.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Hakyll/Web/CompressCss.hs b/src/Hakyll/Web/CompressCss.hs
index 090fe10..52b5396 100644
--- a/src/Hakyll/Web/CompressCss.hs
+++ b/src/Hakyll/Web/CompressCss.hs
@@ -31,12 +31,12 @@ compressCss = compressSeparators
compressSeparators :: String -> String
compressSeparators = replaceAll "; *}" (const "}")
. replaceAll " *([{};:]) *" (take 1 . dropWhile isSpace)
- . replaceAll ";;*" (const ";")
+ . replaceAll ";+" (const ";")
-- | Compresses all whitespace.
--
compressWhitespace :: String -> String
-compressWhitespace = replaceAll "[ \t\n][ \t\n]*" (const " ")
+compressWhitespace = replaceAll "[ \t\n\r]+" (const " ")
-- | Function that strips CSS comments away.
--