aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2021-06-02 13:16:05 +0200
committerAnton Khirnov <anton@khirnov.net>2021-06-02 13:16:05 +0200
commit82bfb2fa04761da2d8c7cf1d76116f9ce90325c3 (patch)
treeb45eb756793b2df7e9ec785e2ca3c695dd79b8e1
parentdf128078fd5fcbe56f9b07b1ea021d909c53bb8d (diff)
Improve variable naming.
-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 {