Skip to content

Commit

Permalink
#100 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed May 3, 2024
1 parent bee3413 commit 4dadb45
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bibcop.pl
Original file line number Diff line number Diff line change
Expand Up @@ -668,10 +668,11 @@ sub fix_capitalization {
my $p = 0;
foreach my $part (@parts) {
$p += 1;
if (exists $minors{$part}) {
if (exists $minors{lc($part)}) {
if ($p > 1) {
my $pre = $parts[$p - 2];
if (not $pre eq '') {
$part = lc($part);
next;
}
}
Expand Down
1 change: 1 addition & 0 deletions perl-tests/fixing.pl
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ package bibcop;
fixes('title', 'it works? of course!', 'It Works? Of Course!');
fixes('title', 'first; second!', 'First; Second!');
fixes('title', 'Face-to-Face discussion', 'Face-to-Face Discussion');
fixes('title', 'Face-To-Face Talk', 'Face-to-Face Talk');
fixes('title', 'long question---short answer', 'Long Question---Short Answer');
fixes('title', 'long question --- short answer', 'Long Question --- Short Answer');
fixes('title', 'does it work?---of course!', 'Does It Work?---Of Course!');
Expand Down

0 comments on commit 4dadb45

Please sign in to comment.