line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package KinoSearch1::Highlight::SimpleHTMLFormatter; |
2
|
18
|
|
|
18
|
|
101
|
use strict; |
|
18
|
|
|
|
|
38
|
|
|
18
|
|
|
|
|
609
|
|
3
|
18
|
|
|
18
|
|
103
|
use warnings; |
|
18
|
|
|
|
|
41
|
|
|
18
|
|
|
|
|
446
|
|
4
|
18
|
|
|
18
|
|
92
|
use KinoSearch1::Util::ToolSet; |
|
18
|
|
|
|
|
43
|
|
|
18
|
|
|
|
|
2540
|
|
5
|
18
|
|
|
18
|
|
102
|
use base qw( KinoSearch1::Highlight::Formatter ); |
|
18
|
|
|
|
|
259
|
|
|
18
|
|
|
|
|
11467
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
BEGIN { |
8
|
18
|
|
|
18
|
|
194
|
__PACKAGE__->init_instance_vars( |
9
|
|
|
|
|
|
|
pre_tag => '', |
10
|
|
|
|
|
|
|
post_tag => '', |
11
|
|
|
|
|
|
|
); |
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub highlight { |
15
|
5
|
|
|
5
|
1
|
8
|
my ( $self, $text ) = @_; |
16
|
5
|
|
|
|
|
30
|
return "$self->{pre_tag}$text$self->{post_tag}"; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
1; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
__END__ |