Skip to content

Commit

Permalink
Fix list-style-type prop when “none” value
Browse files Browse the repository at this point in the history
  • Loading branch information
nicksrandall authored Jan 28, 2022
1 parent 0d2844e commit 9d38efb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/properties/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ impl Default for ListStyleType {

impl Parse for ListStyleType {
fn parse<'i, 't>(input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i, ParserError<'i>>> {
if let Ok(val) = input.try_parse(CounterStyle::parse) {
return Ok(ListStyleType::CounterStyle(val))
}

if input.try_parse(|input| input.expect_ident_matching("none")).is_ok() {
return Ok(ListStyleType::None)
}

if let Ok(val) = input.try_parse(CounterStyle::parse) {
return Ok(ListStyleType::CounterStyle(val))
}

let s = input.expect_string()?.as_ref().to_owned();
Ok(ListStyleType::String(s))
}
Expand Down

0 comments on commit 9d38efb

Please sign in to comment.