[PATCH -perfbook v2 3/9] periodcheck: Add check of nbsp in front of \cite{}

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

 



Also use /usr/bin/env in shebang.

Signed-off-by: Akira Yokosawa <akiyks@xxxxxxxxx>
---
 utilities/periodcheck.pl | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/utilities/periodcheck.pl b/utilities/periodcheck.pl
index 225391ff..c585b147 100755
--- a/utilities/periodcheck.pl
+++ b/utilities/periodcheck.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 # SPDX-License-Identifier: GPL-2.0-or-later
 #
 # Check LaTeX source of mid-sentence and end-of-sentence period
@@ -53,6 +53,12 @@ sub check_line {
 		$safe = 1;
 	    }
 	}
+	if ($line =~ /^(?=[\s]*+[^%])[^%]*[^~]\\cite/) {
+	    $safe = 0;
+	    if ($line =~ /^(?=[\s]*+[^%])[^%]*~\(\\cite/) {
+		$safe = 1;
+	    }
+	}
 	unless ($safe) {
 	    print $ARGV[0], ':', $line_num, ':', $line;
 	}
-- 
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