From 87481f59493b19c95bd7dd4664dc4bc8408dc602 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sun, 27 Nov 2022 19:20:57 +0100 Subject: [PATCH] privoxy-log-parser: Properly highlight a log message that now has a period --- tools/privoxy-log-parser.pl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/privoxy-log-parser.pl b/tools/privoxy-log-parser.pl index 52105fb5..c58726c2 100755 --- a/tools/privoxy-log-parser.pl +++ b/tools/privoxy-log-parser.pl @@ -1805,8 +1805,13 @@ sub handle_loglevel_connect($) { } elsif ($c =~ m/^Optimistically sending /) { # Optimistically sending 318 bytes of client headers intended for www.privoxy.org + # Optimistically sending 318 bytes of client headers intended for www.privoxy.org. $c =~ s@(?<=sending )(\d+)@$h{'Number'}$1$h{'Standard'}@; - $c = highlight_matched_host($c, '(?<=for )[^\s]+'); + if ($c =~ /\.$/) { + $c = highlight_matched_host($c, '[^\s]+(?=\.)'); + } else { + $c = highlight_matched_host($c, '(?<=for )[^\s]+'); + } } elsif ($c =~ m/^Stopping to watch the client socket/) { -- 2.39.2