mirror of
https://github.com/servo/servo.git
synced 2025-08-01 03:30:33 +01:00
Require at least one value when parsing 'content'
This commit is contained in:
parent
a97893a3ed
commit
19b390049c
1 changed files with 4 additions and 2 deletions
|
@ -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(())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue