Skip to content

Commit

Permalink
#107 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed May 3, 2024
1 parent 92979d2 commit eac7f5a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bibcop.pl
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,9 @@ sub fix_capitalization {
foreach my $part (@parts) {
$p += 1;
my $lcp = lc($part);
if (exists $minors{$lcp}) {
my $head = $lcp;
$head =~ s/[,\.!\?;:]$//g;
if (exists $minors{$head}) {
if ($p > 1) {
my $pre = $parts[$p - 2];
if (not $pre eq '') {
Expand Down
2 changes: 2 additions & 0 deletions perl-tests/fixing.pl
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ package bibcop;
fixes('title', 'GitHub Audience?---a Thematic Analysis', 'GitHub Audience? --- A Thematic Analysis');
fixes('title', 'our in-house rules', 'Our In-House Rules');
fixes('title', 'user\'s story', 'User\'s Story');
fixes('title', 'step in, step out', 'Step in, Step Out');
fixes('title', 'are we there yet?', 'Are We There yet?');
fixes('title', 'GitHub Audience? --- a Thematic Analysis', 'GitHub Audience? --- A Thematic Analysis');

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

0 comments on commit eac7f5a

Please sign in to comment.