aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2020-11-11 21:16:23 +0100
committerJohn Ankarström <john@ankarstrom.se>2020-11-11 21:19:20 +0100
commitb43a3929f372729ec9dcb085b343a36565763e7c (patch)
tree96810a7868f39519c3957e2ba07b44a740296cb6
parent2118aab84ad2e5c8b0920af8ca91172f9d26e364 (diff)
downloadrf-b43a3929f372729ec9dcb085b343a36565763e7c.tar.gz
fix spacing bug
-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;