From 0a2b57c68ee6d159fc9010e30a93da1e39bc35ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Wed, 11 Nov 2020 09:33:26 +0100 Subject: fix alt inline ref bug --- rf | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/rf b/rf index bf54bb5..ec47269 100755 --- a/rf +++ b/rf @@ -51,12 +51,13 @@ for (@lines) { $i++; # Inline reference if (/^\.R([fx]) +(.*)/) { + my ($suffix, $prefix, @points); my ($fld, $def) = ($1, $2); - $def =~ s/ ([.,:;\])]) ?([\[(])?$//; - my ($suffix, $prefix) = ($1, $2); + if ($def =~ s/ ([.,:;\])]) ?([\[(])?$//) { + ($suffix, $prefix) = ($1, $2); + } my $winner = 0; my @words = split /\s/, $def; - my @points; # replace '' with preceding word for (@words) { -- cgit v1.2.3