Skip to content

Commit

Permalink
#77 fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Mar 15, 2024
1 parent d6b305e commit 82bf451
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 3 additions & 5 deletions bibcop.pl
Expand Up @@ -607,11 +607,9 @@ sub fix_capitalization {
if (not $word =~ /^[A-Za-z]/) {
next;
}
if (exists $minors{$word}) {
next;
}
if (exists $minors{lc($word)} and $pos gt 1) {
$word = lc($word);
my $lc = lc($word);
if (exists $minors{$lc} and $pos gt 1 and not $words[$pos - 2] =~ /:$/) {
$word = $lc;
next;
}
if ($word =~ /^[a-z].*/) {
Expand Down
2 changes: 2 additions & 0 deletions perl-tests/fixing.pl
Expand Up @@ -39,6 +39,8 @@ package bibcop;
fixes('title', 'The TeX Book', 'The TeX Book');
fixes('title', 'Executing A program On The MIT architecture', 'Executing a Program on the MIT Architecture');
fixes('title', 'Executing a program on the MIT Tagged-token Dataflow architecture', 'Executing a Program on the MIT Tagged-Token Dataflow Architecture');
fixes('title', 'TeX: a Great Tool', 'TeX: A Great Tool');
fixes('title', 'TeX: A Great Tool', 'TeX: A Great Tool');

fixes('booktitle', 'Proceedings Of IEEE Symposium On Art', 'Proceedings of Symposium on Art');
fixes('booktitle', 'Symposium on Computers', 'Proceedings of the Symposium on Computers');
Expand Down

0 comments on commit 82bf451

Please sign in to comment.