| 1 | package Text::Xatena::Node::SeeMore; | ||||||||||
| 2 | |||||||||||
| 3 | 19 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 19 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 19 | ▶ | use base qw(Text::Xatena::Node); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 19 | ▶ | use Text::Xatena::Util; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 19 | ▶ | use constant { | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | 19 | SEEMORE => qr/^====(=)?$/ | |||||||||
| 9 | 19 | }; | |||||||||
| 10 | |||||||||||
| 11 | |||||||||||
| 12 | 422 | ▶ | sub parse { | ||||||||
|
Subroutine
parse: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||
| 13 | 422 | my ($class, $s, $parent, $stack) = @_; | |||||||||
| 14 | 422 | ▶ | if ($s->scan(SEEMORE)) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 15 | 4 | my $is_super = $s->matched->[1]; | |||||||||
| 16 | 4 | my $node = $class->new; | |||||||||
| 17 | 4 | $node->{is_super} = $is_super; | |||||||||
| 18 | 4 | push @$parent, $node; | |||||||||
| 19 | 4 | push @$stack, $node; | |||||||||
| 20 | 4 | return 1; | |||||||||
| 21 | } | ||||||||||
| 22 | } | ||||||||||
| 23 | |||||||||||
| 24 | 4 | ▶ | sub as_html { | ||||||||
|
Subroutine
as_html: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 25 | 4 | my ($self, $context, %opts) = @_; | |||||||||
| 26 | 4 | $context->_tmpl(__PACKAGE__, q[ | |||||||||
| 27 | <div class="seemore"> | ||||||||||
| 28 | {{= $content }} | ||||||||||
| 29 | </div> | ||||||||||
| 30 | ], { | ||||||||||
| 31 | content => $self->SUPER::as_html($context, %opts), | ||||||||||
| 32 | }); | ||||||||||
| 33 | } | ||||||||||
| 34 | |||||||||||
| 35 | 19 | 1; | |||||||||
| 36 | __END__ | ||||||||||