mirror of
https://github.com/aljazceru/goose.git
synced 2026-02-23 07:24:24 +01:00
fix: fix allowing multiple selectors in goosebench (#1814)
This commit is contained in:
@@ -83,8 +83,8 @@ fn matches_any_selectors(eval: &str, selectors: &Vec<String>) -> bool {
|
||||
// selectors must prefix match exactly, no matching half-way in a word
|
||||
// remove one level of nesting at a time and check exact match
|
||||
let nesting_pattern = Regex::new(r":\w+$").unwrap();
|
||||
let mut level_up = eval.to_string();
|
||||
for selector in selectors {
|
||||
let mut level_up = eval.to_string();
|
||||
while !level_up.is_empty() {
|
||||
if level_up == *selector {
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user