Skip to content

Commit

Permalink
#104 fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed May 3, 2024
1 parent 6a2420a commit 16072a9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bibcop.pl
Expand Up @@ -166,6 +166,9 @@ sub check_author {
if ($name =~ /^[A-Z][^.]+$/) {
next
}
if ($name =~ /^(van|de)$/) {
next
}
if ($name =~ /^[A-Z]$/) {
return "A shortened name must have a tailing dot in @{[as_position($pos)]} 'author', as in 'Knuth, Donald E.'";
}
Expand Down
2 changes: 2 additions & 0 deletions perl-tests/checks.pl
Expand Up @@ -95,6 +95,8 @@ package bibcop;
check_passes($f, ('author' => '{Some Weird Author} and {I}'));
check_passes($f, ('author' => '{\'A}lvarez, Carlos and Jim{\'e}nez-Gonz{\'a}lez, Daniel'));
check_passes($f, ('author' => 'Monsalve Diaz, Jose M.'));
check_passes($f, ('author' => 'de Mattos Fortes, Renata Pontin'));
check_passes($f, ('author' => 'van Buren, Andre'));

$f = 'check_capitalization';
check_fails($f, ('title' => 'The TeX book'));
Expand Down

0 comments on commit 16072a9

Please sign in to comment.