From e4c7cb547d8c4754b4b54b82b4315740b7bff37c Mon Sep 17 00:00:00 2001 From: Nicole Rauch Date: Sun, 14 Aug 2016 20:00:16 +0200 Subject: Do not strip comments that are inside constants. --- src/Hakyll/Web/CompressCss.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') 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 -- cgit v1.2.3