From 3d212fbfe0890011377615290e06f31cce96c01d Mon Sep 17 00:00:00 2001 From: Adrian Cochrane Date: Wed, 3 May 2023 14:00:44 +1200 Subject: [PATCH] Corrections for display: list-item. 1. It's display: list-item, not display: list 2. Insert an implicit counter-increment: list-item --- src/Data/CSS/Preprocessor/Text.hs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Data/CSS/Preprocessor/Text.hs b/src/Data/CSS/Preprocessor/Text.hs index 5e4f007..c6ac71e 100644 --- a/src/Data/CSS/Preprocessor/Text.hs +++ b/src/Data/CSS/Preprocessor/Text.hs @@ -102,10 +102,13 @@ instance PropertyParser p => PropertyParser (TextStyle p) where longhand p self "white-space" [Ident "pre-wrap"] = setWhiteSpace p self False False "normal" longhand p self "white-space" [Ident "pre-line"] = setWhiteSpace p self True False "normal" - longhand p self@TextStyle {inner=self'} "display" [Ident "list"] = Just self { - isListItem = True, - inner=fromMaybe self' $ longhand (inner p) self' "display" [Ident "block"] - } + longhand p self@TextStyle {inner=self'} "display" [Ident "list-item"] = + Just self { + isListItem = True, + inner = fromMaybe self' $ + longhand (inner p) self' "display" [Ident "block"], + counterIncrement = insertList "list-item" 1 $ counterIncrement self + } longhand TextStyle {inner=p'} self@TextStyle {inner = self'} "display" value | Just ret <- longhand p' self' "display" value = Just self { isListItem = False, -- 2.30.2