diff options
author | Nicole Rauch <nicole.m@gmx.de> | 2016-08-14 20:00:16 +0200 |
---|---|---|
committer | Nicole Rauch <nicole.m@gmx.de> | 2016-08-14 22:13:31 +0200 |
commit | e4c7cb547d8c4754b4b54b82b4315740b7bff37c (patch) | |
tree | 16eabfde9d1c91a688d483fc7d8083708514fca0 /src/Hakyll/Web/CompressCss.hs | |
parent | ce9730758e5d9317c3b0f060a7db995f52467115 (diff) | |
download | hakyll-e4c7cb547d8c4754b4b54b82b4315740b7bff37c.tar.gz |
Do not strip comments that are inside constants.
Diffstat (limited to 'src/Hakyll/Web/CompressCss.hs')
-rw-r--r-- | src/Hakyll/Web/CompressCss.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Hakyll/Web/CompressCss.hs b/src/Hakyll/Web/CompressCss.hs index 8f67c7c..a032b10 100644 --- a/src/Hakyll/Web/CompressCss.hs +++ b/src/Hakyll/Web/CompressCss.hs @@ -65,6 +65,8 @@ compressWhitespace str stripComments :: String -> String stripComments [] = [] stripComments str + | isPrefixOf "\"" str = head str : retainConstants stripComments "\"" (drop 1 str) + | isPrefixOf "'" str = head str : retainConstants stripComments "'" (drop 1 str) | isPrefixOf "/*" str = stripComments $ eatComments $ drop 2 str | otherwise = head str : stripComments (drop 1 str) where |