Parse CSS that doesn't contain the optional semicolon

This commit is contained in:
mb21 2015-12-02 23:56:44 +01:00
parent ad6578f673
commit 1f379da94b

View file

@ -10,7 +10,7 @@ import Text.Parsec.String
ruleParser :: Parser (String, String)
ruleParser = do
p <- many1 (noneOf ":") <* char ':'
v <- many1 (noneOf ":;") <* char ';' <* spaces
v <- many1 (noneOf ":;") <* (optional $ char ';') <* spaces
return (trim p, trim v)
styleAttrParser :: Parser [(String, String)]