This regex checks label strings inside \cref{}. As $line carries an input line with such arguments removed, it is tested against $line_raw. Signed-off-by: Akira Yokosawa <akiyks@xxxxxxxxx> --- utilities/punctcheck.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utilities/punctcheck.pl b/utilities/punctcheck.pl index 88fd59c0..3488e5b6 100755 --- a/utilities/punctcheck.pl +++ b/utilities/punctcheck.pl @@ -62,7 +62,8 @@ 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*%/ || $next_line =~ /\\item/ || -- 2.17.1