Skip to content

Commit 69ad701

Browse files
committed
track .css files
We have to still track the `.css` files so we can listen for changes.
1 parent e6a8489 commit 69ad701

File tree

1 file changed

+12
-9
lines changed
  • crates/oxide/src/scanner

1 file changed

+12
-9
lines changed

crates/oxide/src/scanner/mod.rs

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -264,18 +264,21 @@ impl Scanner {
264264
.and_then(|x| x.to_str())
265265
.unwrap_or_default(); // In case the file has no extension
266266

267-
// Special handing for CSS files to extract CSS variables
268-
if extension == "css" {
269-
self.css_files.push(path);
270-
continue;
267+
match extension {
268+
// Special handing for CSS files, we don't want to extract candidates from
269+
// these files, but we do want to extract used CSS variables.
270+
"css" => {
271+
self.css_files.push(path.clone());
272+
}
273+
_ => {
274+
self.changed_content.push(ChangedContent::File(
275+
path.to_path_buf(),
276+
extension.to_owned(),
277+
));
278+
}
271279
}
272280

273281
self.extensions.insert(extension.to_owned());
274-
self.changed_content.push(ChangedContent::File(
275-
path.to_path_buf(),
276-
extension.to_owned(),
277-
));
278-
279282
self.files.push(path);
280283
}
281284
}

0 commit comments

Comments
 (0)