From a573b4b47831b68f7315f4580a62d22b8774133d Mon Sep 17 00:00:00 2001 From: David Cooper Date: Tue, 22 Sep 2026 21:50:39 -0700 Subject: [PATCH] Improve emphasize_stuff_in_headers() Improve emphasize_stuff_in_headers() by matching more than one digit at a time. The primary benefit of this change is in the HTML, since it does not result in each digit being wrapped by ... --- testssl.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/testssl.sh b/testssl.sh index e069eca..51ad7fd 100755 --- a/testssl.sh +++ b/testssl.sh @@ -3381,9 +3381,10 @@ emphasize_stuff_in_headers() ( match="$BASH_REMATCH" pr_yellow "$match" stuff="${stuff/#$match}" - elif [[ "${stuff:0:1}" =~ [0-9] ]]; then - pr_brown "${stuff:0:1}" - stuff="${stuff:1}" + elif [[ "$stuff" =~ ^[0-9][0-9][0-9][0-9][0-9][0-9][0-9]|^[0-9][0-9][0-9][0-9][0-9][0-9]|^[0-9][0-9][0-9][0-9][0-9]|^[0-9][0-9][0-9][0-9]|^[0-9][0-9][0-9]|^[0-9][0-9]|^[0-9] ]]; then + match="$BASH_REMATCH" + pr_brown "$match" + stuff="${stuff/#$match}" else out "${stuff:0:1}" stuff="${stuff:1}"