line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Text::Xatena::Node::SeeMore; |
2
|
|
|
|
|
|
|
|
3
|
17
|
|
|
17
|
|
91
|
use strict; |
|
17
|
|
|
|
|
37
|
|
|
17
|
|
|
|
|
655
|
|
4
|
17
|
|
|
17
|
|
88
|
use warnings; |
|
17
|
|
|
|
|
33
|
|
|
17
|
|
|
|
|
585
|
|
5
|
17
|
|
|
17
|
|
99
|
use base qw(Text::Xatena::Node); |
|
17
|
|
|
|
|
28
|
|
|
17
|
|
|
|
|
417
|
|
6
|
17
|
|
|
17
|
|
101
|
use Text::Xatena::Util; |
|
17
|
|
|
|
|
33
|
|
|
17
|
|
|
|
|
157
|
|
7
|
|
|
|
|
|
|
use constant { |
8
|
17
|
|
|
|
|
4340
|
SEEMORE => qr/^====(=)?$/ |
9
|
17
|
|
|
17
|
|
1849
|
}; |
|
17
|
|
|
|
|
57
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub parse { |
13
|
381
|
|
|
381
|
0
|
626
|
my ($class, $s, $parent, $stack) = @_; |
14
|
381
|
100
|
|
|
|
969
|
if ($s->scan(SEEMORE)) { |
15
|
4
|
|
|
|
|
12
|
my $is_super = $s->matched->[1]; |
16
|
4
|
|
|
|
|
23
|
my $node = $class->new; |
17
|
4
|
|
|
|
|
249
|
$node->{is_super} = $is_super; |
18
|
4
|
|
|
|
|
9
|
push @$parent, $node; |
19
|
4
|
|
|
|
|
9
|
push @$stack, $node; |
20
|
4
|
|
|
|
|
23
|
return 1; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub as_html { |
25
|
4
|
|
|
4
|
0
|
10
|
my ($self, $context, %opts) = @_; |
26
|
4
|
|
|
|
|
29
|
$context->_tmpl(__PACKAGE__, q[ |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
{{= $content }} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
], { |
31
|
|
|
|
|
|
|
content => $self->SUPER::as_html($context, %opts), |
32
|
|
|
|
|
|
|
}); |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |
36
|
|
|
|
|
|
|
__END__ |