@@ 24,23 24,29 @@ BEGIN {
else {
# identify header section
- if (in_header==1 && $0 ~ /^-\s+-{5,}/) in_header=0;
- else if ($0 ~ /^-\s+-{5,}/) in_header=1;
+ if (in_header==1 && $0 ~ /^-\s+-{5,}/ || $0 ~ /^\s*$/) in_header=0;
+ else if ($0 ~ /^(-\s+-{5,}|(Package|CVE ID)\s*:)/) in_header=1;
if (in_header==1) {
- if ($0 !~ /^-/) {
+ if ($0 ~ /^Package\s*:/) {
+ whitespace=substr(" ",length($1)+3)
+ $3=whitespace dim cyan $3;
+ $0=$0 reset;
+ }
+ else if ($0 ~ /^CVE ID\s*:/) {
+ whitespace=substr(" ",length($1)+length($2)+4)
+ $4=whitespace dim cyan $4;
+ $0=$0 reset;
+ }
+ else if ($0 !~ /^-/) {
$0=dim cyan $0 reset;
}
}
else {
- if ($0 ~ /^(Package|Mailing list)\s*:/) {
+ if ($0 ~ /^Mailing list:/) {
$3=dim cyan $3;
$0=$0 reset;
}
- else if ($0 ~ /^(CVE ID)\s*:/) {
- $4=dim cyan $4;
- $0=$0 reset;
- }
for (i in releases) {
replacement=yellow releases[i] reset;
gsub(releases[i],replacement);