Only allow one @charset rule.

This commit is contained in:
Simon Sapin 2013-08-14 14:17:33 +01:00
parent be51f4fb8f
commit b5860f407f

View file

@ -56,7 +56,7 @@ fn parse_stylesheet(css: &str) -> Stylesheet {
log_css_error(rule.location, "@charset must be the first rule")
}
// Valid @charset rules are just ignored
next_state = state;
next_state = STATE_IMPORTS;
},
"import" => {
if state > STATE_IMPORTS {