From c58641a1700a928dca9e94e7426904f315649c0a Mon Sep 17 00:00:00 2001 From: Krzysztof Jurewicz Date: Fri, 17 Nov 2017 15:56:47 +0100 Subject: Fix compression of calc() in CSS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit According to Mozilla Developer Network, “The + and - operators must always be surrounded by whitespace.”. --- tests/Hakyll/Web/CompressCss/Tests.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests') diff --git a/tests/Hakyll/Web/CompressCss/Tests.hs b/tests/Hakyll/Web/CompressCss/Tests.hs index 7420e4c..bf51ee2 100644 --- a/tests/Hakyll/Web/CompressCss/Tests.hs +++ b/tests/Hakyll/Web/CompressCss/Tests.hs @@ -42,6 +42,8 @@ tests = testGroup "Hakyll.Web.CompressCss.Tests" $ concat , "a>b" @=? compressCss "a > b" , "a+b" @=? compressCss "a + b" , "a!b" @=? compressCss "a ! b" + -- compress calc() + , "calc(1px + 100%/(5 + 3) - (3px + 2px)*5)" @=? compressCss "calc( 1px + 100% / ( 5 + 3) - calc( 3px + 2px ) * 5 )" -- compress whitespace even after this curly brace , "}" @=? compressCss "; } " -- but do not compress separators inside of constants -- cgit v1.2.3