From 82bfb2fa04761da2d8c7cf1d76116f9ce90325c3 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Wed, 2 Jun 2021 13:16:05 +0200 Subject: Improve variable naming. --- reselect | 9 +++++---- 1 file 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 { -- cgit v1.2.3