Skip to content

Commit

Permalink
#78 fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Mar 15, 2024
1 parent 82bf451 commit e61a336
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bibcop.pl
Expand Up @@ -579,6 +579,9 @@ sub fix_author {
my @authors = split(/\s+and\s+/, $value);
foreach my $author (@authors) {
$author =~ s/^\s+|\s+$//g;
if (index($author, '{') != -1 or index($author, '}') != -1) {
next;
}
$author =~ s/ ([A-Z])($| )/ $1.$2/g;
if (index($author, ',') eq -1) {
my @words = split(/\s+/, $author);
Expand Down
1 change: 1 addition & 0 deletions perl-tests/fixing.pl
Expand Up @@ -35,6 +35,7 @@ package bibcop;
fixes('author', 'Brandon, Lucia', 'Brandon, Lucia');
fixes('author', 'Lucia Brandon', 'Brandon, Lucia');
fixes('author', 'Peter J. Landin', 'Landin, Peter J.');
fixes('author', 'Tan Yiyu and Lo {Wan Yiu}', 'Yiyu, Tan and Lo {Wan Yiu}');

fixes('title', 'The TeX Book', 'The TeX Book');
fixes('title', 'Executing A program On The MIT architecture', 'Executing a Program on the MIT Architecture');
Expand Down

0 comments on commit e61a336

Please sign in to comment.