[PATCH -perfbook 1/2] punctcheck.pl: Fix false positive by stricter pattern for \acr{}

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



A false positive in defer/rcuintro.tex by punctcheck.pl made
Paul do a wrong band-aide change in commit 8e3364bead00
("defer/rcuintro: Fix ThomasEHart2006a punctuation issue.").

It was because the pattern "\{.+\}" matches all of
"{qsbr}~\cite{ThomasEHart2006a}" and the script saw the
sentence as if it ended with "\IXacrfst{}."

Silence the false positive by using a stricter pattern of
"\{[^\}]+\}".

Signed-off-by: Akira Yokosawa <akiyks@xxxxxxxxx>
---
 utilities/punctcheck.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utilities/punctcheck.pl b/utilities/punctcheck.pl
index 3488e5b6..7d23cc57 100755
--- a/utilities/punctcheck.pl
+++ b/utilities/punctcheck.pl
@@ -62,7 +62,7 @@ sub check_line {
 	$ng = 0;
 	if ($line =~ /^(?=[\s]*+[^%])[^%]*[A-Z][\)\']*[\.\?\!\:][\)\}\']*$/ ||
 	    $line =~ /^(?=[\s]*+[^%])[^%]*[A-Z][\)\']*[\.\?\!\:]\\footnote/ ||
-	    $line =~ /^(?=[\s]*+[^%])[^%]*[Aa]crm?(f|fst)?\{.+\}[\)\']*[\.\?\!\:][\)\}\']*$/ ||
+	    $line =~ /^(?=[\s]*+[^%])[^%]*[Aa]crm?(f|fst)?\{[^\}]+\}[\)\']*[\.\?\!\:][\)\}\']*$/ ||
 	    $line_raw =~ /\\[Cc]ref\{(cha|chp)\:app:[^\}]*\}[\.\?\!\:][\)\}\']*$/ ) {
 	    $ng += 1;
 	    if ($next_line =~ /^\s*$/ || $next_line =~ /^\s*%/ ||

base-commit: f21271f0939bb620a95b1bb3d76ac0259c4bb54c
-- 
2.17.1




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux