Skip to content

Commit

Permalink
Merge pull request #575 from squidowl/channel-fragment-fix
Browse files Browse the repository at this point in the history
Avoid having a empty # channel clickable
  • Loading branch information
tarkah authored Sep 17, 2024
2 parents 8a8a0f0 + 92b6a1d commit c457c69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion data/src/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ fn parse_channel_fragments(text: &str) -> Vec<Fragment> {
if !is_whitespace
// Only parse on `#` since it's most common and
// using &!+ leads to more false positives than not
&& text.starts_with('#')
&& text.strip_prefix('#').map_or(false, |rest| !rest.is_empty())
&& !text.contains(proto::CHANNEL_BLACKLIST_CHARS)
{
return Fragment::Channel(text);
Expand Down

0 comments on commit c457c69

Please sign in to comment.