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]