mirror of
https://github.com/drwetter/testssl.sh.git
synced 2026-10-04 23:48:13 +02:00
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 <span style="color:#8a7237;">...</span>
This commit is contained in:
+4
-3
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user