From a45750d2c44f347f0927908e7856cf6160cfb270 Mon Sep 17 00:00:00 2001 From: Abdul Wahab Date: Fri, 18 Sep 2026 17:03:18 +0500 Subject: [PATCH] Fix: scope spinner exemption to the containing tag (#837) A spinner on the same line as a rounded card was suppressing the card's border-accent finding. animate-spin is now checked on the match's markup tag, the same sibling-tag split gray-on-color uses. Written with AI assistance. Co-authored-by: Cursor --- crates/detect/src/regex_matchers.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/crates/detect/src/regex_matchers.rs b/crates/detect/src/regex_matchers.rs index 630207454..79c093737 100644 --- a/crates/detect/src/regex_matchers.rs +++ b/crates/detect/src/regex_matchers.rs @@ -868,7 +868,11 @@ pub static REGEX_MATCHERS: Lazy> = Lazy::new(|| { Matcher { id: "border-accent-on-rounded", find_all: |l| all(&BORDER_ACCENT_TW_RE, l), - test: |m, line| has_rounded(line) && num(m.g(1)) >= 1.0 && !ANIMATE_SPIN_RE.is_match(line), + test: |m, line| { + has_rounded(line) + && num(m.g(1)) >= 1.0 + && !ANIMATE_SPIN_RE.is_match(&containing_markup_tag(line)(m.index)) + }, fmt: |m, _| m.whole().to_string(), }, Matcher { @@ -1472,6 +1476,10 @@ mod tests { assert!(g(r#"
"#).is_empty()); assert!(g(r#"
"#).is_empty()); assert!(g(r#"
"#).is_empty()); + assert_eq!( + g(r#"
"#), + vec!["border-t-4"] + ); } #[test]