From e93f691527f4d92ba4acf875454df92af6404852 Mon Sep 17 00:00:00 2001 From: Andrea Rossato Date: Fri, 12 Oct 2007 21:39:20 +0200 Subject: Parser: semplify color parsing darcs-hash:20071012193920-d6583-14b739dd4e04e221e3ff9ceacf0b2e7bf365f3de.gz --- Parsers.hs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Parsers.hs b/Parsers.hs index a236368..72fba94 100644 --- a/Parsers.hs +++ b/Parsers.hs @@ -74,11 +74,7 @@ colorsAndText config = -- | Parses a color specification (hex or named) colorSpec :: Parser String colorSpec = - do { c <- char '#' - ; s <- count 6 hexDigit - ; return $ c:s - } - <|> many1 alphaNum + many1 (alphaNum <|> char ',' <|> char '#') -- | Parses the output template string templateStringParser :: Config -> Parser (String,String,String) -- cgit v1.2.3