Skip to content

Commit

Permalink
#31 ignore DOI for typography check
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed May 20, 2023
1 parent 2972121 commit a1c16d3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions bibcop.pl
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,9 @@ sub check_typography {
if ($tag =~ /^:.*/) {
next;
}
if ($tag eq 'doi') {
next;
}
my $value = $entry{$tag};
foreach my $s (@bad_tails) {
if ($s eq '.' and $tag eq 'author') {
Expand Down
2 changes: 1 addition & 1 deletion perl-tests/checking.pl
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ package bibcop;
'booktitle' => '{Proceedings of the ICCQ}',
'year' => '1984',
'volume' => '32',
'doi' => '10.5555/1102013_82a-44',
'doi' => '10.1016/0743-7315(91)90016-3',
'pages' => '22--33'
));

Expand Down
5 changes: 5 additions & 0 deletions perl-tests/checks.pl
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@ package bibcop;
check_fails($f, (':type' => 'Article'));
check_passes($f, (':type' => 'article'));

$f = 'check_doi';
check_fails($f, ('doi' => 'hello, world!'));
check_passes($f, ('doi' => '10.1016/0743-7315(91)90016-3'));
check_passes($f, ('doi' => '10.1145/359576.359579'));

$f = 'check_arXiv';
check_fails($f, ('archiveprefix' => 'arXiv'));
check_fails($f, ('archiveprefix' => 'arXiv', 'eprint' => '2111.13384'));
Expand Down

0 comments on commit a1c16d3

Please sign in to comment.