Skip to content

Commit

Permalink
chore: update name
Browse files Browse the repository at this point in the history
  • Loading branch information
fireairforce committed Sep 27, 2024
1 parent 5dd0947 commit 510d4e2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ impl Rule for NoUselessFragments {
child.syntax().text().to_string().trim().to_string();

if (in_jsx_expr || in_js_logical_expr)
&& contains_html_entity(&child_text)
&& contains_html_character_references(&child_text)
{
children_where_fragments_must_preserved = true;
break;
Expand Down Expand Up @@ -416,7 +416,7 @@ impl Rule for NoUselessFragments {
}
}

fn contains_html_entity(s: &str) -> bool {
fn contains_html_character_references(s: &str) -> bool {
let and = s.find('&');
let semi = s.find(';');
matches!((and, semi), (Some(and), Some(semi)) if and < semi)
Expand Down

0 comments on commit 510d4e2

Please sign in to comment.