Skip to content

Commit

Permalink
chore: update html entity
Browse files Browse the repository at this point in the history
  • Loading branch information
fireairforce committed Sep 27, 2024
1 parent bde9261 commit cb4a041
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ function Component() {
}
```

Contributed by @fireairforce

### Parser

#### Bug fixes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -417,5 +417,7 @@ impl Rule for NoUselessFragments {
}

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

0 comments on commit cb4a041

Please sign in to comment.