aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--reselect9
1 files changed, 5 insertions, 4 deletions
diff --git a/reselect b/reselect
index 4bfb17a..f3d2240 100644
--- a/reselect
+++ b/reselect
@@ -17,7 +17,7 @@ my $re_git_hash = qr{\b[0-9a-f]{7,40}\b}x;
sub find_matches {
my ($pattern, $text, $rowmap) = @_;
- my @overlays;
+ my @matches;
while ($text =~ /$pattern/g) {
my $ndx = $-[0];
my $href = $&;
@@ -33,11 +33,12 @@ sub find_matches {
last;
}
}
- my @ov = ($col, $row, $href);
- push(@overlays, \@ov) if ($row >= 0);
+ if ($row >= 0) {
+ push(@matches, [$col, $row, $href]);
+ }
}
- return @overlays;
+ return @matches;
}
sub build_overlays {