Small tweak to avoid marking up initialisms and acronyms like GCC, API

and PAM as code.  As a side effect, this simplifies the code for CVEs.


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@820 185d5e19-27fe-0310-9dcf-9bff6b9f3609
This commit is contained in:
Dag-Erling Smørgrav 2014-10-09 14:34:03 +00:00
parent 561cd87dbe
commit 623d9e7b2f
1 changed files with 3 additions and 3 deletions

View File

@ -33,7 +33,7 @@
use strict;
use warnings;
my $CVEURL = "http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-";
my $CVEURL = "http://web.nvd.nist.gov/view/vuln/detail?vulnId=";
while (<>) {
if (m/^OpenPAM ([A-Z][a-z]+)\t+(\d\d\d\d-\d\d-\d\d)\s*$/) {
@ -45,8 +45,8 @@ while (<>) {
}
$changes =~ s/^ - ([A-Z]+): / - '''$1''' /gm;
$changes =~ s/([\w.-]+\(\d*\))/`$1`/gs;
$changes =~ s/([^'])\b([A-Z_]{2,})\b([^'])/$1`$2`$3/gs;
$changes =~ s/`CVE`-(\d{4}-\d+)/[$CVEURL$1 CVE-$1]/gs;
$changes =~ s/([^'])\b([A-Z_]{4,})\b([^'])/$1`$2`$3/gs;
$changes =~ s/(CVE-\d{4}-\d+)/[$CVEURL$1 $1]/gs;
$changes =~ s/([.!?])\n +(\w)/$1 $2/gs;
$changes =~ s/(\S)\n +(\S)/$1 $2/gs;
open(my $fh, ">", "$relname.txt")