65 |
}); |
}); |
66 |
|
|
67 |
sub as_markup { |
sub as_markup { |
68 |
my ($self) = @_; |
my $self = shift; |
69 |
|
my $callback = {@_}; |
70 |
|
|
71 |
my $patt = $self->pattern; |
my $patt = $self->pattern; |
72 |
$self->title( $patt ); |
$self->title( $patt ); |
102 |
if ( $path ne $last_path ) { |
if ( $path ne $last_path ) { |
103 |
$html .= qq|<dt class="p">$path</dt>|; |
$html .= qq|<dt class="p">$path</dt>|; |
104 |
} |
} |
105 |
$text =~ s{(\Q$patt\E)}{<b>$1</b>}; |
if ( my $dd = $callback->{dd} ) { |
106 |
$html .= qq|<dd><a target="editor" href="/editor+$path+$line">$line</a> <code>$text</code>|; |
$html .= $dd->( $patt, $path, $line, $text ); |
107 |
|
} else { |
108 |
|
$text =~ s{(\Q$patt\E)}{<b>$1</b>}; |
109 |
|
$html .= qq|<dd><a target="editor" href="/editor+$path+$line">$line</a> <code>$text</code>|; |
110 |
|
} |
111 |
$last_path = $path; |
$last_path = $path; |
112 |
} else { |
} else { |
113 |
$html .= qq|<dt>$text</dt>|; |
$html .= qq|<dt>$text</dt>|; |