diff options
author | John Ankarström <john@ankarstrom.se> | 2020-11-11 12:38:10 +0100 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2020-11-11 12:39:33 +0100 |
commit | 7843645fef1470cddd503b1ffa1c7c337d21e74c (patch) | |
tree | c5da33dfc6d35b39d9cdb0e828813c6f658de307 | |
parent | 23061c27188da281bcfb396855b01f8628298f87 (diff) | |
download | rf-7843645fef1470cddd503b1ffa1c7c337d21e74c.tar.gz |
fix '' and reflist bugs
-rwxr-xr-x | rf | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -11,9 +11,9 @@ my $format_list = '%a (%y). {\fI%t\fR}. {\*Q%q\*U}. %n, %d. %c: %p. {Available: # Internal variables -my $author_last = 0; # whether the previous reference field was Ra +my $author_last = 1; # whether the previous reference field was Ra my @lines; -my $i = -1; +my $i = 0; my @refs; while (<>) { @@ -63,6 +63,7 @@ for (@lines) { for (@words) { if ($_ eq "''") { $_ = $lines[$i-1]; + chomp; $_ =~ s/^.*\s(\S+)\s*$/$1/; } } @@ -81,7 +82,7 @@ for (@lines) { exit 1; } if ($points[$winner] < 150) { - print STDERR "Warning: Guessing that reference '$def' refers to " . fmt($format_full, $winner) . ".\n"; + print STDERR "Warning: Guessing that reference '$def' refers to " . fmt($format_full, $winner) . " (match = $points[$winner]).\n"; } if ($fld eq 'f') { |