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