File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -264,18 +264,21 @@ impl Scanner {
264
264
. and_then ( |x| x. to_str ( ) )
265
265
. unwrap_or_default ( ) ; // In case the file has no extension
266
266
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
+ }
271
279
}
272
280
273
281
self . extensions . insert ( extension. to_owned ( ) ) ;
274
- self . changed_content . push ( ChangedContent :: File (
275
- path. to_path_buf ( ) ,
276
- extension. to_owned ( ) ,
277
- ) ) ;
278
-
279
282
self . files . push ( path) ;
280
283
}
281
284
}
You can’t perform that action at this time.
0 commit comments