line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Text::Livedoor::Wiki::Plugin::Block::OL; |
2
|
|
|
|
|
|
|
|
3
|
5
|
|
|
5
|
|
31
|
use warnings; |
|
5
|
|
|
|
|
13
|
|
|
5
|
|
|
|
|
175
|
|
4
|
5
|
|
|
5
|
|
32
|
use strict; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
205
|
|
5
|
5
|
|
|
5
|
|
33
|
use base qw(Text::Livedoor::Wiki::Plugin::Base::Block::List); |
|
5
|
|
|
|
|
13
|
|
|
5
|
|
|
|
|
1631
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub check { |
8
|
146
|
|
|
146
|
1
|
214
|
my $self = shift; |
9
|
146
|
|
|
|
|
218
|
my $line = shift; |
10
|
146
|
|
|
|
|
196
|
my $args = shift; |
11
|
146
|
|
|
|
|
251
|
my $on_next = $args->{on_next}; |
12
|
146
|
|
|
|
|
297
|
my $id = $args->{id}; |
13
|
|
|
|
|
|
|
|
14
|
146
|
100
|
|
|
|
510
|
if( my( $mark ) = $line =~ /^(\+{1,3})[^\+]/ ) { |
15
|
9
|
|
|
|
|
11
|
my $level = length $mark ; |
16
|
9
|
100
|
|
|
|
21
|
unless ( $on_next ) { |
17
|
5
|
|
|
|
|
82
|
$line =~ s/^\+{$level}//; |
18
|
|
|
|
|
|
|
} |
19
|
9
|
|
|
|
|
56
|
return { id => $id , level => $level , line => $line }; |
20
|
|
|
|
|
|
|
} |
21
|
137
|
|
|
|
|
5012
|
return; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub get { |
25
|
1
|
|
|
1
|
1
|
3
|
my $self = shift; |
26
|
1
|
|
|
|
|
3
|
my $block = shift; |
27
|
1
|
|
|
|
|
4
|
my $inline = shift; |
28
|
1
|
|
|
|
|
3
|
my $items = shift; |
29
|
1
|
|
|
|
|
17
|
$self->list( $inline , $items,'ol'); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
1; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 NAME |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
Text::Livedoor::Wiki::Plugin::Block::OL - OL Block Plugin |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 SYNOPSIS |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
+ hoge |
41
|
|
|
|
|
|
|
++ hogehoge |
42
|
|
|
|
|
|
|
+++ hy mom |
43
|
|
|
|
|
|
|
+ hoge |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 DESCRIPTION |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
create surrounded list. till 3 level. |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 FUNCTION |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head2 check |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head2 get |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 AUTHOR |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
polocky |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=cut |