| blib/lib/Text/HikiDoc/Plugin/e.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| statement | 15 | 15 | 100.0 |
| branch | 2 | 2 | 100.0 |
| condition | 2 | 2 | 100.0 |
| subroutine | 4 | 4 | 100.0 |
| pod | 1 | 1 | 100.0 |
| total | 24 | 24 | 100.0 |
| line | stmt | bran | cond | sub | pod | time | code |
|---|---|---|---|---|---|---|---|
| 1 | package Text::HikiDoc::Plugin::e; | ||||||
| 2 | |||||||
| 3 | 2 | 2 | 11 | use strict; | |||
| 2 | 5 | ||||||
| 2 | 81 | ||||||
| 4 | 2 | 2 | 29 | use warnings; | |||
| 2 | 6 | ||||||
| 2 | 62 | ||||||
| 5 | 2 | 2 | 10 | use base 'Text::HikiDoc::Plugin'; | |||
| 2 | 4 | ||||||
| 2 | 203 | ||||||
| 6 | |||||||
| 7 | sub to_html { | ||||||
| 8 | 7 | 7 | 1 | 10 | my $self = shift; | ||
| 9 | 7 | 100 | 26 | my $str = shift || ''; | |||
| 10 | |||||||
| 11 | 7 | 100 | 30 | if ( $str =~ /^(\d+)$/ ) { | |||
| 12 | 4 | 10 | $str = ''.$str.';'; | ||||
| 13 | } | ||||||
| 14 | else { | ||||||
| 15 | 3 | 9 | $str = '&'.$str.';'; | ||||
| 16 | } | ||||||
| 17 | |||||||
| 18 | 7 | 113 | return $str; | ||||
| 19 | } | ||||||
| 20 | |||||||
| 21 | 1; |