… | |
… | |
234 | my $rend = $line->r; |
234 | my $rend = $line->r; |
235 | |
235 | |
236 | # mark all characters as underlined. we _must_ not toggle underline, |
236 | # mark all characters as underlined. we _must_ not toggle underline, |
237 | # as we might get called on an already-marked url. |
237 | # as we might get called on an already-marked url. |
238 | &{$matcher->[2]} |
238 | &{$matcher->[2]} |
239 | for @{$rend}[ $-[0] .. $+[0] - 1]; |
239 | for @{$rend}[$-[0] .. $+[0] - 1]; |
240 | |
240 | |
241 | $line->r ($rend); |
241 | $line->r ($rend); |
242 | } |
242 | } |
243 | } |
243 | } |
244 | |
244 | |
… | |
… | |
255 | |
255 | |
256 | sub find_matches { |
256 | sub find_matches { |
257 | my ($self, $row, $col) = @_; |
257 | my ($self, $row, $col) = @_; |
258 | my $line = $self->line ($row); |
258 | my $line = $self->line ($row); |
259 | my $text = $line->t; |
259 | my $text = $line->t; |
260 | my $off = $line->offset_of ($row, $col) if $col; |
260 | my $off = $line->offset_of ($row, $col) if defined $col; |
261 | |
261 | |
262 | my @matches; |
262 | my @matches; |
263 | for my $matcher (@{$self->{matchers}}) { |
263 | for my $matcher (@{$self->{matchers}}) { |
264 | my $launcher = $matcher->[1] || $self->{launcher}; |
264 | my $launcher = $matcher->[1] || $self->{launcher}; |
265 | while ($text =~ /$matcher->[0]/g) { |
265 | while ($text =~ /$matcher->[0]/g) { |