Skip to content
Merged
Prev Previous commit
Next Next commit
Fix formatting
  • Loading branch information
thecrypticace committed Nov 12, 2025
commit 956ce18d1b4666e254320274b12b05adfa16eadb
8 changes: 3 additions & 5 deletions crates/oxide/src/extractor/arbitrary_property_machine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,12 +235,12 @@ impl Machine for ArbitraryPropertyMachine<ParsingValueState> {
// otherwise its invalid
Class::Exclamation if self.bracket_stack.is_empty() => {
if cursor.input[cursor.pos..].starts_with(b"!important]") {
cursor.advance_by(10);
cursor.advance_by(10);

return self.done(self.start_pos, cursor);
return self.done(self.start_pos, cursor);
}

return self.restart()
return self.restart();
}

// Everything else is valid
Expand Down Expand Up @@ -384,10 +384,8 @@ mod tests {
"[background:url(https://example.com?q={[{[([{[[2]]}])]}]})]",
vec!["[background:url(https://example.com?q={[{[([{[[2]]}])]}]})]"],
),

// A property containing `!` at the top-level is invalid
("[color:red!]", vec![]),

// Unless its part of `!important at the end
("[color:red!important]", vec!["[color:red!important]"]),
] {
Expand Down
12 changes: 6 additions & 6 deletions crates/oxide/src/extractor/pre_processors/ruby.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ impl PreProcessor for Ruby {

cursor.advance();
continue;
},
}

b'\'' => {
cursor.advance();
Expand All @@ -116,7 +116,7 @@ impl PreProcessor for Ruby {

cursor.advance();
continue;
},
}

// Replace comments in Ruby files
b'#' => {
Expand All @@ -130,15 +130,15 @@ impl PreProcessor for Ruby {

// Everything else is part of the comment and replaced
_ => {
result[cursor.pos] = b' ';
cursor.advance();
},
result[cursor.pos] = b' ';
cursor.advance();
}
};
}

cursor.advance();
continue;
},
}

_ => {}
}
Expand Down