line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# $Id: Body.pm 284 2006-12-01 07:51:49Z chronos $ |
2
|
|
|
|
|
|
|
package BBCode::Body; |
3
|
6
|
|
|
6
|
|
35
|
use base qw(BBCode::Tag); |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
648
|
|
4
|
6
|
|
|
6
|
|
3123
|
use BBCode::Tag::Block; |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
170
|
|
5
|
6
|
|
|
6
|
|
41
|
use BBCode::Util qw(multilineText); |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
310
|
|
6
|
6
|
|
|
6
|
|
31
|
use strict; |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
154
|
|
7
|
6
|
|
|
6
|
|
28
|
use warnings; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
1562
|
|
8
|
|
|
|
|
|
|
our $VERSION = '0.34'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub Tag($):method { |
11
|
368
|
|
|
368
|
1
|
1499
|
return 'BODY'; |
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub BodyPermitted($):method { |
15
|
162
|
|
|
162
|
1
|
588
|
return 1; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub BodyTags($):method { |
19
|
122
|
|
|
122
|
1
|
521
|
return qw(:ALL BODY); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub bodyHTML($):method { |
23
|
48
|
|
|
48
|
1
|
232
|
return BBCode::Tag::Block::bodyHTML(shift); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub toBBCode($):method { |
27
|
48
|
|
|
48
|
1
|
396
|
my $this = shift; |
28
|
48
|
|
|
|
|
168
|
my $ret = ""; |
29
|
48
|
|
|
|
|
151
|
foreach($this->body) { |
30
|
87
|
|
|
|
|
413
|
$ret .= $_->toBBCode; |
31
|
|
|
|
|
|
|
} |
32
|
48
|
|
|
|
|
177
|
return multilineText $ret; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub toHTML($):method { |
36
|
48
|
|
|
48
|
1
|
104
|
my $this = shift; |
37
|
48
|
|
|
|
|
247
|
my $pfx = $this->parser->css_prefix; |
38
|
48
|
|
|
|
|
186
|
my $body = $this->bodyHTML; |
39
|
48
|
|
|
|
|
248
|
return multilineText qq( \n$body\n \n); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |