From 623d9e7b2ff4f83de769ef6eb678e3600619a8b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Thu, 9 Oct 2014 14:34:03 +0000 Subject: [PATCH] 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 --- misc/history2wiki.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/misc/history2wiki.pl b/misc/history2wiki.pl index 09ed122..099b692 100755 --- a/misc/history2wiki.pl +++ b/misc/history2wiki.pl @@ -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")