mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-26 13:59:47 +01:00
Interpreter: do not dehighlight nicks that are followed by a colon
This commit is contained in:
parent
30494e54b2
commit
525b2ee056
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user