Skip to content

Commit

Permalink
Avoid having a empty # as clickable
Browse files Browse the repository at this point in the history
  • Loading branch information
casperstorm committed Sep 17, 2024
1 parent 12e209a commit 92b6a1d
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 92b6a1d

Please sign in to comment.