aboutsummaryrefslogtreecommitdiff
path: root/rf
diff options
context:
space:
mode:
Diffstat (limited to 'rf')
-rwxr-xr-xrf6
1 files changed, 4 insertions, 2 deletions
diff --git a/rf b/rf
index a734cf1..8d28fd9 100755
--- a/rf
+++ b/rf
@@ -12,7 +12,6 @@ $fmt{d} = '%a (%y). {\fI%t\fR}. {\*Q%q\*U}. %n, %d. %c: %p. {Available: %w.}';
# Internal variables
-my $author_last = 1; # whether the previous reference field was Ra
my @lines;
my @refs;
@@ -119,7 +118,6 @@ for (my $i = $#lines; $i >= 0; $i--) {
}
# print formatted reference
- push @r, "\n" if $fmt =~ s/^\n//;
my $n = index($fmt, "\n");
$prefix = '' if not $prefix;
$suffix = '' if not $suffix;
@@ -133,9 +131,13 @@ for (my $i = $#lines; $i >= 0; $i--) {
}
# non-rf line
+
+ # whether or not to include a final newline depends on the
+ # format of the inline reference on the line below
if (!$inlref) {
push @r, "\n";
}
+
push @r, $_;
$refblock = 0;