Branch Coverage

blib/lib/Text/Trac2GFM.pm
Criterion Covered Total %
branch 61 68 89.7


line true false branch
152 35 3 unless defined $opts and ref $opts eq 'HASH'
156 36 2 unless exists $opts->{'image_base'}
157 37 1 unless exists $opts->{'commits'} and ref $opts->{'commits'} eq 'HASH'
180 1 1 ++$edge % 2 == 1 ? :
186 1 1 defined $1 ? :
195 1 1 substr($2, 0, 1) eq '!' ? :
205 1 1 defined $2 && length $2 > 0 ? :
214 1 2 defined $2 && length $2 > 0 ? :
229 3 3 exists $opts->{'commits'}{$+{'num'}} ? :
238 3 0 substr($url, -1, 1) eq '/' ? :
253 6 90 if ($lines[$i] =~ /^\s*\|\|/s) { }
0 90 elsif (@table > 0) { }
268 11 79 if ($lines[$i] =~ /^\s*$/)
273 2 77 if ($i > 0 and $lines[$i - 1] =~ /^>/)
274 2 0 if ($lines[$i] =~ /^\s+(\S.*)/) { }
288 3 35 if @table and @table > 0
290 20 18 if (@lines == 1) { }
297 33 5 if $end_with_nl and not $trac =~ /\n$/s
357 0 13 unless defined $title and length $title > 0
361 0 13 if $title eq 'WikiStart'
364 6 7 if (defined $opts and ref $opts eq 'HASH')
387 13 0 if (exists $defaults->{'terms'} and ref $defaults->{'terms'} eq 'HASH')
393 12 1 if $defaults->{'unslash'}
398 12 1 if ($defaults->{'downcase'})
399 5 7 if $title =~ /\b([A-Z][a-z0-9]+){2,}\b/s
413 1 5 $_ =~ /^\s+.*\S$/ ? :
2 6 $_ =~ /^\S.*\s+$/s ? :
421 2 6 unless defined $widths[$j] and $widths[$j] > length $rows[$i][$j]
429 7 1 $_ >= 5 ? :
438 8 0 if defined $headers[$i]
446 2 6 if ($aligns[$i] eq 'l') { }
1 5 elsif ($aligns[$i] eq 'r') { }
481 4 12 if ($align eq 'l') { }
2 10 elsif ($align eq 'r') { }