Branch Coverage

blib/lib/Markdown/Perl/InlineTree.pm
Criterion Covered Total %
branch 135 164 82.3


line true false branch
72 1308 266658 if exists $options{'debug'}
74 12445 255521 if (builtin::blessed($content) and $content->isa('Markdown::Perl::InlineTree')) { }
255521 0 elsif (not ref $content) { }
85 246079 21887 if ($type eq 'text' or $type eq 'code' or $type eq 'literal' or $type eq 'html') { }
11650 10237 elsif ($type eq 'link') { }
10237 0 elsif ($type eq 'style') { }
86 0 246079 if $content_ref
87 0 246079 if %options
90 0 11650 unless exists $options{'type'}
93 0 11650 unless exists $options{'target'}
95 92 11558 if exists $options{'title'}
96 1 11649 if exists $options{'content'}
97 0 11650 if keys %options
100 0 10237 if keys %options > 1 or not exists $options{'tag'}
101 0 10237 unless $content_ref
127 0 180326 if $this->{'escaped'}
130 108739 71587 if ($this->{'type'} eq 'text') { }
21284 50303 elsif ($this->{'type'} eq 'literal') { }
3801 46502 elsif ($this->{'type'} eq 'code') { }
11650 34852 elsif ($this->{'type'} eq 'link') { }
34852 0 elsif ($this->{'type'} eq 'html' or $this->{'type'} eq 'style') { }
143 9442 2208 if ($this->{'linktype'} eq 'autolink') { }
2208 0 elsif ($this->{'linktype'} eq 'link' or $this->{'linktype'} eq 'img') { }
153 92 2116 if (exists $this->{'title'})
231 425026 66151 if (is_node($node_or_tree)) { }
66151 0 elsif (is_tree($node_or_tree)) { }
257 139096 0 is_node($_) ? :
275 22475 40877 is_node($_) ? :
308 0 81699 unless $sn->{'type'} eq "text" or $text_start == 0
329 0 81699 unless $text_end == 0 or $en->{'type'} eq "text"
330 0 81699 if $text_start < 0
332 0 81699 if $text_end != 0 and $text_end > length $en->{'content'}
335 250 81449 if ($text_end == 0)
346 81449 250 unless $empty_last
348 11130 70569 if length $nodes[0]{'content'} == 0
349 0 81449 if not $empty_last and @nodes and length $nodes[-1]{'content'} == 0
353 3475 78224 if ($child_start != $child_end) { }
354 486 2989 if ($text_start == 0) { }
359 2411 1064 if ($empty_last or $text_end == length $en->{'content'}) { }
367 72603 5621 if ($text_start > 0)
370 66493 11731 if (not $empty_last and $text_end < length $sn->{'content'})
374 5621 72603 if $text_start == 0
378 43085 38614 if wantarray
410 0 0 if defined wantarray
435 2203 239248 if ($_->has_subtree) { }
436 39 2164 if (defined wantarray) { }
447 30544 208704 if (defined wantarray) { }
457 28235 95384 if defined wantarray
478 12445 167881 if $_->has_subtree
573 40279 119043 unless $this->{'children'}[$i]{'type'} eq "text"
574 4625 114418 if ($i == $child_start and $text_start != 0) { }
585 329 41473 if $i == ($child_bound // -1) and $Markdown::Perl::InlineTree::LAST_MATCH_START[0] >= $text_bound
586 41429 44 if ($open == 0)
587 41383 46 if wantarray
620 290 4012 unless $this->{'children'}[$i]{'type'} eq "text"
621 3739 273 if ($i == $child_start and $text_start != 0) { }
633 0 4371 if $i == ($child_bound // -1) and $Markdown::Perl::InlineTree::LAST_MATCH_START[0] >= $text_bound
634 3040 1331 if $open == 0 and $done or $open < 0
660 0 178498 unless $n->{'escaped'}
662 153015 25483 if ($n->{'type'} eq 'text' or $n->{'type'} eq 'literal' or $n->{'type'} eq 'html') { }
3781 21702 elsif ($n->{'type'} eq 'code') { }
11553 10149 elsif ($n->{'type'} eq 'link') { }
10149 0 elsif ($n->{'type'} eq 'style') { }
668 92 11461 if (exists $n->{'title'})
671 10741 812 if ($n->{'linktype'} eq 'link' or $n->{'linktype'} eq 'autolink') { }
812 0 elsif ($n->{'linktype'} eq 'img') { }
675 9359 1382 exists $n->{'content'} ? :
685 1 10148 if ($n->{'tag'} =~ /^\.(.*)$/u) { }
716 0 1827 unless $n->{'escaped'}
717 1188 639 if ($n->{'type'} eq 'text') { }
88 551 elsif ($n->{'type'} eq 'style') { }
434 117 elsif ($n->{'type'} eq 'literal' or $n->{'type'} eq 'html') { }
97 20 elsif ($n->{'type'} eq 'link') { }
20 0 elsif ($n->{'type'} eq 'code') { }
727 13 84 if ($n->{'linktype'} ne 'autolink') { }
779 0 23816 if $n->{'escaped'}
780 22592 1224 if ($n->{'type'} eq 'text') { }
8 1216 elsif ($n->{'type'} eq 'literal' and $unescape_literal) { }
721 495 elsif ($n->{'type'} eq 'literal' or $n->{'type'} eq 'html') { }
121 374 elsif ($n->{'type'} eq 'code') { }
374 0 elsif ($n->{'type'} eq 'link') { }
790 335 39 if ($n->{'linktype'} eq 'autolink') { }