From b43a3929f372729ec9dcb085b343a36565763e7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Wed, 11 Nov 2020 21:16:23 +0100 Subject: fix spacing bug --- rf | 6 ++++-- 1 file 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; -- cgit v1.2.3