Branch Coverage

lib/ChordPro/Output/HTML.pm
Criterion Covered Total %
branch 49 108 45.3


line true false branch
31 3 3 $_ =~ /^(display|default)$/ ? :
62 0 0 unless ($layout->can("register_shortcode"))
85 3 0 if (defined $s->{'subtitle'})
91 0 3 if $tidy
97 0 30 if ($elt->{'type'} eq "empty")
102 3 27 if ($elt->{'type'} eq "colb")
107 3 24 if ($elt->{'type'} eq "newpage")
112 0 24 if ($elt->{'type'} eq "songline")
117 0 24 if ($elt->{'type'} eq "tab")
120 0 0 if $_->{'type'} eq "set"
125 0 0 if $tidy
129 12 12 if (exists $elt->{'body'})
134 0 51 if ($e->{'type'} eq "empty")
138 48 3 if ($e->{'type'} eq "songline")
142 0 3 if ($e->{'type'} =~ /^comment(_\w+)?$/)
148 0 3 if ($e->{'type'} eq "set" and $e->{'name'} eq "label")
154 0 3 if ($e->{'type'} eq "delegate" and $e->{'subtype'} =~ /^image(?:-(\w+))?$/)
159 0 0 unless eval "require $pkg"
163 0 0 unless $res
167 0 3 if ($e->{'type'} eq "svg")
171 0 0 if $tidy
178 0 12 if $tidy
182 12 0 if ($elt->{'type'} eq "comment" or $elt->{'type'} eq "comment_italic")
183 0 12 if ($elt->{'chords'}) { }
187 0 0 if $elt->{'chords'}[$i]
199 0 12 if $tidy
203 0 0 if ($elt->{'type'} eq "image")
211 0 0 if ($elt->{'type'} eq "image")
219 0 0 if $tidy
223 0 0 if ($elt->{'type'} eq "control")
224 0 0 if ($elt->{'name'} eq "lyrics-only")
226 0 0 unless $lyrics_only > 1
242 48 63 $_ eq '' ? :
245 24 24 if ($lyrics_only or $single_space and not $elt->{'chords'} && join('', @c) =~ /\S/)
260 24 42 if ($_ eq "")
265 0 42 if ($c->isa('ChordPro::Chord::Annotation')) { }
274 12 54 $_ =~ s/^\s+// ? :
277 0 24 if ($config->{'settings'}{'chords-under'})
352 0 108 unless defined $_[0]
393 0 102 if ($fragment->{'type'} eq "strut")
394 0 0 unless length($fragment->{'label'} // "")
398 0 102 unless length $fragment->{'text'}
402 0 102 if ($f->{'style'} eq "italic")
405 0 102 if ($f->{'weight'} eq "bold")
408 0 102 if ($fragment->{'color'} and $fragment->{'color'} ne $self->{'_currentcolor'})
411 0 102 if ($fragment->{'size'} and $fragment->{'size'} ne $self->{'_currentsize'})
414 0 102 if ($fragment->{'bgcolor'})
417 0 102 if ($fragment->{'underline'})
420 0 102 if ($fragment->{'strikethrough'})
423 0 102 if @d
425 0 102 if length $href
426 0 102 if @c
428 0 102 if @c
429 0 102 if length $href