summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrea Rossato <andrea.rossato@ing.unitn.it>2007-10-12 21:39:20 +0200
committerAndrea Rossato <andrea.rossato@ing.unitn.it>2007-10-12 21:39:20 +0200
commite93f691527f4d92ba4acf875454df92af6404852 (patch)
tree21119dd4de85554a14c77159682b3fc12231d532
parent7064cb084ea05f13a54ec7cfb2956f5ade5458ba (diff)
downloadxmobar-e93f691527f4d92ba4acf875454df92af6404852.tar.gz
xmobar-e93f691527f4d92ba4acf875454df92af6404852.tar.bz2
Parser: semplify color parsing
darcs-hash:20071012193920-d6583-14b739dd4e04e221e3ff9ceacf0b2e7bf365f3de.gz
-rw-r--r--Parsers.hs6
1 files changed, 1 insertions, 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)