| 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 | 6 | use strict; | |||
| 2 | 2 | ||||||
| 2 | 45 | ||||||
| 4 | 2 | 2 | 18 | use warnings; | |||
| 2 | 2 | ||||||
| 2 | 50 | ||||||
| 5 | 2 | 2 | 7 | use base 'Text::HikiDoc::Plugin'; | |||
| 2 | 2 | ||||||
| 2 | 136 | ||||||
| 6 | |||||||
| 7 | sub to_html { | ||||||
| 8 | 7 | 7 | 1 | 6 | my $self = shift; | ||
| 9 | 7 | 100 | 14 | my $str = shift || ''; | |||
| 10 | |||||||
| 11 | 7 | 100 | 20 | if ( $str =~ /^(\d+)$/ ) { | |||
| 12 | 4 | 7 | $str = ''.$str.';'; | ||||
| 13 | } | ||||||
| 14 | else { | ||||||
| 15 | 3 | 6 | $str = '&'.$str.';'; | ||||
| 16 | } | ||||||
| 17 | |||||||
| 18 | 7 | 71 | return $str; | ||||
| 19 | } | ||||||
| 20 | |||||||
| 21 | 1; |