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 | 9 | use strict; | |||
2 | 3 | ||||||
2 | 55 | ||||||
4 | 2 | 2 | 6 | use warnings; | |||
2 | 2 | ||||||
2 | 54 | ||||||
5 | 2 | 2 | 6 | use base 'Text::HikiDoc::Plugin'; | |||
2 | 2 | ||||||
2 | 351 | ||||||
6 | |||||||
7 | sub to_html { | ||||||
8 | 8 | 8 | 1 | 7 | my $self = shift; | ||
9 | 8 | 100 | 15 | my $num = shift || 1; | |||
10 | 8 | 100 | 17 | my $style = shift || ''; | |||
11 | |||||||
12 | 8 | 6 | my $ret = ' | ||||
13 | 8 | 100 | 14 | $ret .= ' style="'.$style.'"' if $style; | |||
14 | 8 | 50 | 15 | $ret .= $self->{empty_element_suffix} || ' />'; | |||
15 | |||||||
16 | 8 | 84 | return $ret x $num; | ||||
17 | } | ||||||
18 | |||||||
19 | 1; |