blib/lib/Text/HikiDoc/Plugin/br.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 16 | 16 | 100.0 |
branch | 2 | 2 | 100.0 |
condition | 5 | 6 | 83.3 |
subroutine | 4 | 4 | 100.0 |
pod | 1 | 1 | 100.0 |
total | 28 | 29 | 96.5 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Text::HikiDoc::Plugin::br; | ||||||
2 | |||||||
3 | 2 | 2 | 12 | use strict; | |||
2 | 5 | ||||||
2 | 82 | ||||||
4 | 2 | 2 | 13 | use warnings; | |||
2 | 2 | ||||||
2 | 83 | ||||||
5 | 2 | 2 | 10 | use base 'Text::HikiDoc::Plugin'; | |||
2 | 3 | ||||||
2 | 699 | ||||||
6 | |||||||
7 | sub to_html { | ||||||
8 | 8 | 8 | 1 | 12 | my $self = shift; | ||
9 | 8 | 100 | 24 | my $num = shift || 1; | |||
10 | 8 | 100 | 24 | my $style = shift || ''; | |||
11 | |||||||
12 | 8 | 11 | my $ret = ' | ||||
13 | 8 | 100 | 21 | $ret .= ' style="'.$style.'"' if $style; | |||
14 | 8 | 50 | 25 | $ret .= $self->{empty_element_suffix} || ' />'; | |||
15 | |||||||
16 | 8 | 101 | return $ret x $num; | ||||
17 | } | ||||||
18 | |||||||
19 | 1; |