aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xrf7
1 files 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) {