From acad9091764c18f94c94af14b62f9d7f9a5966c9 Mon Sep 17 00:00:00 2001 From: Adrian Cochrane Date: Mon, 4 May 2020 19:49:03 +1200 Subject: [PATCH] Test counters() handling against longhand rather than shorthand. Because that's where it'll be passed --- src/Data/CSS/Preprocessor/Text.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Data/CSS/Preprocessor/Text.hs b/src/Data/CSS/Preprocessor/Text.hs index 3f55845..cb0ec26 100644 --- a/src/Data/CSS/Preprocessor/Text.hs +++ b/src/Data/CSS/Preprocessor/Text.hs @@ -54,9 +54,9 @@ instance PropertyParser p => PropertyParser (TextStyle p) where shorthand self "white-space" [Ident val] | val `elem` ["normal", "pre", "pre-wrap", "pre-line"] = [("white-space", [Ident val])] | otherwise = shorthand (inner self) "white-space" [Ident val] - shorthand TextStyle { inner = self' } key value - | [(k, _)] <- shorthand self' key $ removeCounters value, k == key = [(key, value)] - | otherwise = shorthand self' key value + shorthand TextStyle { inner = s } k v + | Just _ <- longhand s s k $ removeCounters v = [(k, v)] + | otherwise = shorthand s k v longhand _ self "counter-reset" value = (\v -> self {counterReset = v}) <$> parseCounters 0 value longhand _ self "counter-increment" value = (\v -> self {counterIncrement = v}) <$> parseCounters 1 value -- 2.30.2