Require at least one value when parsing 'content'

This commit is contained in:
Simon Sapin 2015-02-06 11:30:24 +11:00
parent a97893a3ed
commit 19b390049c

View file

@ -698,8 +698,10 @@ pub mod longhands {
Ok(Token::QuotedString(value)) => {
content.push(ContentItem::StringContent(value.into_owned()))
}
Ok(_) => return Err(()),
Err(()) => return Ok(SpecifiedValue::Content(content))
Err(()) if !content.is_empty() => {
return Ok(SpecifiedValue::Content(content))
}
_ => return Err(())
}
}
}