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