Branch Coverage

lib/ChordPro/Output/Markdown.pm
Criterion Covered Total %
branch 47 66 71.2


line true false branch
37 0 10 if (@book)
38 0 0 if $main::options->{'backend-option'}{'tidy'}
50 173 95 if ($_ =~ /.{1,}/) { }
54 68 27 if $count == 0
71 55 100 if ($item->{'type'} eq "songline" and $item->{'context'} eq "")
77 10 0 if defined $s->{'title'}
78 3 7 if (defined $s->{'subtitle'})
82 10 0 if ($lyrics_only eq 0)
88 30 162 if ($_ eq -1)
107 25 77 unless length $c
108 1 76 if $c->info->is_annotation
118 14 18 if ($empty =~ /^\s+/)
134 0 67 if ($lyrics_only or $single_space and not $elt->{'chords'} && join('', map({$_->raw;} @{$$elt{'chords'};})) =~ /\S/)
141 32 35 unless ($elt->{'chords'})
145 0 35 if (my $f = $main::config->{'settings'}{'inline-chords'})
146 0 0 unless $f =~ /^[^%]*\%s[^%]*$/
161 4 98 if $d > 0
162 90 12 if $d < 0
169 35 0 if ($c_line ne '') { }
176 0 35 $chords_under ? :
196 0 19 if ($elt->{'chords'})
200 0 0 if $elt->{'chords'}[$_] ne ""
203 0 19 if ($elt->{'type'} =~ /italic$/)
233 50 1 if ($elt->{'type'} eq "songline")
234 18 32 if (defined $elt->{'chords'} and scalar @{$elt->{'chords'};} > 0)
244 2 1 body_has_chords($lineobject->{'body'}) ? :
257 16 7 body_has_chords($lineobject->{'body'}) ? :
267 0 11 if ($elt->{'name'} eq 'lyrics-only') { }
0 11 elsif ($elt->{'name'} =~ /^(text\..+)/) { }
269 0 0 unless $lyrics_only > 1
320 16 62 $_->{'class'} eq 'chord' ? :
334 10 150 if ($elt->{'type'} eq "verse" and $last_type =~ /comment/)
339 140 20 if (defined $line_routines{$sub_type}) { }