line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Text::Livedoor::Wiki::Plugin::Block::Blockquote; |
2
|
|
|
|
|
|
|
|
3
|
5
|
|
|
5
|
|
27
|
use warnings; |
|
5
|
|
|
|
|
12
|
|
|
5
|
|
|
|
|
180
|
|
4
|
5
|
|
|
5
|
|
28
|
use strict; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
156
|
|
5
|
5
|
|
|
5
|
|
28
|
use base qw(Text::Livedoor::Wiki::Plugin::Block); |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
1305
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub check { |
8
|
249
|
|
|
249
|
1
|
374
|
my $class = shift; |
9
|
249
|
|
|
|
|
435
|
my $line = shift; |
10
|
249
|
|
|
|
|
368
|
my $args = shift; |
11
|
249
|
|
|
|
|
463
|
my $id = $args->{id}; |
12
|
249
|
|
|
|
|
382
|
my $on_next = $args->{on_next}; |
13
|
249
|
100
|
|
|
|
1085
|
if( $line =~ /^[ \t>]/ ) { |
14
|
21
|
100
|
|
|
|
63
|
$line =~ s/^[ \t>]// unless $on_next;; |
15
|
21
|
|
|
|
|
121
|
return { id => $id , line => $line . "\n" }; |
16
|
|
|
|
|
|
|
} |
17
|
228
|
|
|
|
|
1203
|
return; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub get { |
21
|
5
|
|
|
5
|
1
|
10
|
my $class = shift; |
22
|
5
|
|
|
|
|
10
|
my $block = shift; |
23
|
5
|
|
|
|
|
7
|
my $inline = shift; |
24
|
5
|
|
|
|
|
10
|
my $items = shift; |
25
|
5
|
|
|
|
|
10
|
my $id = $items->[0]{id}; |
26
|
5
|
|
|
|
|
10
|
my $text = ''; |
27
|
5
|
|
|
|
|
24
|
$text .= $_->{line} for @$items; |
28
|
5
|
|
|
|
|
27
|
my $html = $inline->parse($text); |
29
|
5
|
|
|
|
|
37
|
return qq|\n$html\n \n|; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
1; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 NAME |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
Text::Livedoor::Wiki::Plugin::Block::Blockquote - Blockquote Block Plugin |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 DESCRIPTION |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
surround text with blockquote tag |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 SYNOPSIS |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
> block text |
45
|
|
|
|
|
|
|
> here here here |
46
|
|
|
|
|
|
|
> hi mom! |
47
|
|
|
|
|
|
|
> you can use space instead of > or TAB if you want. |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 FUNCTION |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head2 check |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head2 get |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 AUTHOR |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
polocky |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=cut |