summaryrefslogtreecommitdiff
path: root/biblio/bibtex/utils/bibcop
diff options
context:
space:
mode:
Diffstat (limited to 'biblio/bibtex/utils/bibcop')
-rw-r--r--biblio/bibtex/utils/bibcop/bibcop.12
-rw-r--r--biblio/bibtex/utils/bibcop/bibcop.dtx2
-rw-r--r--biblio/bibtex/utils/bibcop/bibcop.pdfbin343290 -> 343290 bytes
-rwxr-xr-xbiblio/bibtex/utils/bibcop/bibcop.pl11
4 files changed, 12 insertions, 3 deletions
diff --git a/biblio/bibtex/utils/bibcop/bibcop.1 b/biblio/bibtex/utils/bibcop/bibcop.1
index da9b44a0dd..48f55428ed 100644
--- a/biblio/bibtex/utils/bibcop/bibcop.1
+++ b/biblio/bibtex/utils/bibcop/bibcop.1
@@ -1,4 +1,4 @@
-.TH bibcop 1 "2023-01-10"
+.TH bibcop 1 "2023-01-29"
.SH NAME
bibcop \- Style Checker and Fixer of BibTeX Files (.bib)
.SH SYNOPSIS
diff --git a/biblio/bibtex/utils/bibcop/bibcop.dtx b/biblio/bibtex/utils/bibcop/bibcop.dtx
index c2690c58d7..d3b34027c7 100644
--- a/biblio/bibtex/utils/bibcop/bibcop.dtx
+++ b/biblio/bibtex/utils/bibcop/bibcop.dtx
@@ -50,7 +50,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{bibcop}
%<*package>
-[2023-01-10 0.0.7 Style Checker of Bibliography Files]
+[2023-01-29 0.0.8 Style Checker of Bibliography Files]
%</package>
%<*driver>
\documentclass{ltxdoc}
diff --git a/biblio/bibtex/utils/bibcop/bibcop.pdf b/biblio/bibtex/utils/bibcop/bibcop.pdf
index d1497efae8..29fb6056bb 100644
--- a/biblio/bibtex/utils/bibcop/bibcop.pdf
+++ b/biblio/bibtex/utils/bibcop/bibcop.pdf
Binary files differ
diff --git a/biblio/bibtex/utils/bibcop/bibcop.pl b/biblio/bibtex/utils/bibcop/bibcop.pl
index 73535c1de5..fd774d9019 100755
--- a/biblio/bibtex/utils/bibcop/bibcop.pl
+++ b/biblio/bibtex/utils/bibcop/bibcop.pl
@@ -435,6 +435,7 @@ sub entries {
my %entry;
my $acc = '';
my $tag = '';
+ my $interrupted = ''; # where the comment interrupted the proceeding (state name)
my $lineno = 0;
my $nest = 0;
my $escape = 0;
@@ -442,9 +443,17 @@ sub entries {
my $char = substr($bib, $pos, 1);
if ($char eq ' ') {
# ignore the white space
+ } elsif ($char eq '%' and not($s eq 'quote')) {
+ $interrupted = $s;
+ $s = 'comment';
} elsif ($char eq "\n") {
# ignore the EOL
$lineno = $lineno + 1;
+ if ($s eq 'comment') {
+ $s = $interrupted;
+ }
+ } elsif ($s eq 'comment') {
+ # ignore the comment
} elsif ($s eq 'top') {
if ($char eq '@') {
%entry = ();
@@ -622,7 +631,7 @@ if (@ARGV+0 eq 0 or exists $args{'--help'} or exists $args{'-?'}) {
" --latex Report errors in LaTeX format using \\PackageWarningNoLine command\n\n" .
"If any issues, report to GitHub: https://github.com/yegor256/bibcop");
} elsif (exists $args{'--version'} or exists $args{'-v'}) {
- info('0.0.7');
+ info('0.0.8');
} else {
my ($file) = grep { not($_ =~ /^--.*$/) } @ARGV;
if (not $file) {