From 77f2d28eb8df6e870a2b2abaded992881e2ce6a3 Mon Sep 17 00:00:00 2001 From: Adrian Cochrane Date: Sun, 4 Jun 2023 16:04:05 +1200 Subject: [PATCH] Improve code cleanliness. --- lib/Graphics/Rendering/Rect/CSS/Colour.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Graphics/Rendering/Rect/CSS/Colour.hs b/lib/Graphics/Rendering/Rect/CSS/Colour.hs index 852dba2..b28c697 100644 --- a/lib/Graphics/Rendering/Rect/CSS/Colour.hs +++ b/lib/Graphics/Rendering/Rect/CSS/Colour.hs @@ -234,8 +234,8 @@ parseColour _ (Ident x:toks) | Just x' <- inner $ Txt.toLower x = parseColour _ (Ident x:toks) | Txt.toLower x == "transparent" = Just (toks, transparent) -- FIXME: Add infrastructure to prioritize resolving `color` -parseColour self (Ident x:toks) - | Txt.toLower x `elem` ["currentcolor","initial"]=Just (toks,foreground self) +parseColour self@ColourPallet { foreground = colour} (Ident x:toks) + | Txt.toLower x `elem` ["currentcolor", "initial"] = Just (toks, colour) | Txt.toLower x == "accentcolor" = Just (toks, accent self) parseColour _ (Function "hsl":h':Comma: -- 2.30.2