Skip to content

Commit

Permalink
Filter out SOH control char before matching logic for highlight notif…
Browse files Browse the repository at this point in the history
…ications
  • Loading branch information
englut committed Dec 16, 2024
1 parent 93bdb32 commit 4533b80
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions data/src/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,7 @@ fn text_references_nickname(text: &str, nickname: NickRef) -> Option<bool> {

fn parse_user_and_channel_fragments(text: &str, channel_users: &[User]) -> Vec<Fragment> {
text.chars()
.filter(|&c| c != '\u{1}')
.group_by(|c| c.is_whitespace())
.into_iter()
.flat_map(|(is_whitespace, chars)| {
Expand Down Expand Up @@ -1239,6 +1240,7 @@ pub fn references_user_text(sender: NickRef, own_nick: NickRef, text: &str) -> b
sender != own_nick
&& text
.chars()
.filter(|&c| c != '\u{1}')
.group_by(|c| c.is_whitespace())
.into_iter()
.any(|(is_whitespace, chars)| {
Expand Down

0 comments on commit 4533b80

Please sign in to comment.