diff --git a/src/rules/jsx_curly_braces.rs b/src/rules/jsx_curly_braces.rs index 96667e30..794b22c8 100644 --- a/src/rules/jsx_curly_braces.rs +++ b/src/rules/jsx_curly_braces.rs @@ -18,7 +18,7 @@ pub struct JSXCurlyBraces; const CODE: &str = "jsx-curly-braces"; -const IGNORE_CHARS: Lazy = Lazy::new(|| Regex::new(r"[{}>]").unwrap()); +const IGNORE_CHARS: Lazy = Lazy::new(|| Regex::new(r"[{}<>]").unwrap()); impl LintRule for JSXCurlyBraces { fn tags(&self) -> Tags { @@ -183,9 +183,14 @@ mod tests { foo{" "} "#, + r#"
foo{"<"}
"#, r#"
foo{">"}
"#, r#"
foo{"}"}
"#, r#"
foo{"{"}
"#, + r#"
foo{"foo <"}
"#, + r#"
foo{"foo >"}
"#, + r#"
foo{"foo }"}
"#, + r#"
foo{"foo {"}
"#, }; }