Interpreter: do not dehighlight nicks that are followed by a colon

This commit is contained in:
Pragmatic Software 2020-02-08 14:42:20 -08:00
parent 30494e54b2
commit 525b2ee056
1 changed files with 2 additions and 2 deletions

View File

@ -912,10 +912,10 @@ sub dehighlight_nicks {
foreach my $nick (@nicks) {
$nick = quotemeta $nick;
my $const_line = $line;
while ($const_line =~ m/(?<![^\W_])($nick)(?![^\W_])/gi) {
while ($const_line =~ m/(?<![^\W_])($nick)(?![^\W_:])/gi) {
my $match = $1;
$match =~ s/^(.)/$1\x{200b}/;
$line =~ s/$nick/$match/i;
$line =~ s/$nick(?!:)/$match/i;
}
}
return $line;