End-of-sentence markers ("\@.") make sense when they follow uppercase letters. Mid-sentence markers (".\@") make sense when they follow lowercase letters. Add patterns to cache reverse uses. Signed-off-by: Akira Yokosawa <akiyks@xxxxxxxxx> --- utilities/punctcheck.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/utilities/punctcheck.pl b/utilities/punctcheck.pl index 7d23cc57..8820bf9c 100755 --- a/utilities/punctcheck.pl +++ b/utilities/punctcheck.pl @@ -91,6 +91,12 @@ sub check_line { if ($line =~ /^(?=[\s]*+[^%])[^%]*\\\@[\.\?\!\:][\)\}\']*\s+[^%]/){ $ng += 1; } + if ($line =~ /[a-z][\)\}\']*\\\@[\.\?\!\:][\)\}\']*\s/) { + $ng += 1; + } + if ($line =~ /[A-Z][\)\}\']*[\.\?\!\:]\\\@[\)\}\']*\s/) { + $ng += 1; + } if ($ng) { print $ARGV[0], ':', $line_num, ':', $line_raw; } -- 2.25.1