line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Text::Trac::Table; |
2
|
|
|
|
|
|
|
|
3
|
8
|
|
|
8
|
|
47
|
use strict; |
|
8
|
|
|
|
|
15
|
|
|
8
|
|
|
|
|
228
|
|
4
|
8
|
|
|
8
|
|
35
|
use warnings; |
|
8
|
|
|
|
|
13
|
|
|
8
|
|
|
|
|
189
|
|
5
|
8
|
|
|
8
|
|
35
|
use base qw(Text::Trac::BlockNode); |
|
8
|
|
|
|
|
10
|
|
|
8
|
|
|
|
|
35
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.24'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub init { |
10
|
120
|
|
|
120
|
0
|
212
|
my $self = shift; |
11
|
120
|
|
|
|
|
2081
|
$self->pattern(qr/^\|\|([^\|]*\|\|(?:[^\|]*\|\|)+)$/xms); |
12
|
120
|
|
|
|
|
708
|
return $self; |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub parse { |
16
|
2
|
|
|
2
|
0
|
5
|
my ( $self, $l ) = @_; |
17
|
2
|
|
|
|
|
5
|
my $c = $self->{context}; |
18
|
2
|
|
|
|
|
29
|
my $pattern = $self->pattern; |
19
|
2
|
50
|
|
|
|
16
|
$l =~ $pattern or return $l; |
20
|
|
|
|
|
|
|
|
21
|
2
|
|
|
|
|
7
|
$c->htmllines('');
22
|
|
|
|
|
|
|
|
23
|
2
|
|
|
|
|
6
|
$c->unshiftline; |
24
|
2
|
|
100
|
|
|
4
|
while ( $c->hasnext and ( $c->nextline =~ $pattern ) ) { |
25
|
3
|
|
|
|
|
9
|
my $l = $c->shiftline; |
26
|
3
|
|
|
|
|
56
|
$l =~ s{ $self->{pattern} }{$1}xmsg; |
27
|
|
|
|
|
|
|
$l = ' | ' . join( |
28
|
|
|
|
|
|
|
' | ', |
29
|
|
|
|
|
|
|
map { |
30
|
3
|
|
|
|
|
12
|
$self->replace($_) # parse inline nodes |
|
9
|
|
|
|
|
202
|
|
31
|
|
|
|
|
|
|
} split( /\|\|/, $l ) |
32
|
|
|
|
|
|
|
) . ' | ';
33
|
|
|
|
|
|
|
|
34
|
3
|
|
|
|
|
101
|
$c->htmllines($l); |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
2
|
|
|
|
|
5
|
$c->htmllines(' | '); |
38
|
|
|
|
|
|
|
|
39
|
2
|
|
|
|
|
7
|
return; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |