mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Auto merge of #18716 - jdm:parseSrcset, r=jdm
Parse srcset attribute values Squashed version of #18313. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix (partially) #11416 - [x] There are tests for these changes <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18716) <!-- Reviewable:end -->
This commit is contained in:
commit
1f9182507f
4 changed files with 280 additions and 2 deletions
|
@ -58,7 +58,8 @@ pub fn split_commas<'a>(s: &'a str) -> Filter<Split<'a, char>, fn(&&str) -> bool
|
|||
s.split(',').filter(not_empty as fn(&&str) -> bool)
|
||||
}
|
||||
|
||||
fn is_ascii_digit(c: &char) -> bool {
|
||||
/// Character is ascii digit
|
||||
pub fn is_ascii_digit(c: &char) -> bool {
|
||||
match *c {
|
||||
'0'...'9' => true,
|
||||
_ => false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue