Branch Coverage

blib/lib/Markdown/Perl/Inlines.pm
Criterion Covered Total %
branch 188 194 96.9


line true false branch
46 24494 20383 if ($that->get_use_extended_autolinks)
107 18742 31241 if ($+{'code'}) { }
111 3638 15104 if ($text =~ /(?
113 2992 646 if $start_before > 0
125 8540 22701 if ($text =~ /\G(?$re)>/u) { }
4 22697 elsif ($text =~ /\G(?$email_re)>/u) { }
14505 8192 elsif ($text =~ /\G(?:$html_tag_re)>/u) { }
126 7452 1088 if $start_before > 0
131 0 4 if $start_before > 0
139 13800 705 if $start_before > 0
147 42476 2401 if $text
156 12182 81225 if ($node->{'type'} eq 'code' or $node->{'type'} eq 'link') { }
66720 14505 elsif ($node->{'type'} eq 'text') { }
14505 0 elsif ($node->{'type'} eq 'html') { }
172 77 80 if $Markdown::Perl::Inlines::LAST_MATCH_START[0] > 0
177 66713 7 if $node->{'content'}
200 26815 68455 if $n->{'type'} ne "text"
203 42113 50151 if ($+{'open'}) { }
204 8260 33853 $pos[2] - $pos[1] > 1 ? :
207 19846 30305 unless @open_link
209 32 30273 unless $open{'active'}
215 28140 2133 unless %target
222 1326 807 if ($open{'type'} eq "link")
224 116 131 if $_->{'type'} eq "link"
246 0 30273 unless $n->{'type'} eq "text"
253 3826 26447 if (exists $+{'inline'}) { }
1003 25444 elsif (exists $+{'reference'}) { }
256 687 316 if ($+{'reference'} eq '[') { }
266 2046 28227 if ($has_space)
270 6 2040 if ($mode eq 'reference' and $type eq 'reference' || $type eq 'collapsed' and $+{'space'} =~ /^ ?(?:\n[ \t]*)?$/u) { }
280 3779 26494 if ($type eq 'inline') { }
634 25860 elsif ($type eq 'reference') { }
282 1966 1813 if @target
287 45 589 if exists $target{'target'}
291 435 154 if %target
297 19233 8594 if $ref
298 122 27705 if (my $l = get_linkref($that, $linkrefs, $ref))
299 18 104 if $type eq "collapsed"
333 59 3720 if ($has_bracket) { }
112 3608 elsif (length $n->{'content'} <= $search_start and @{$tree->{'children'};} > $cur_child + 1 and $tree->{'children'}[$cur_child + 1]{'type'} eq 'html' || $tree->{'children'}[$cur_child + 1]{'type'} eq 'link') { }
2925 683 elsif (my(@end_target) = $tree->find_in_text_with_balanced_content(qr/\(/u, qr/\)/u, qr/[ [:cntrl:]]/u, $cur_child, $search_start)) { }
334 15 44 if (my(@end_target) = $tree->find_in_text(qr/>/u, $cur_child, $search_start + 1))
336 2 13 if $tree->find_in_text(qr/<|\n/u, @target)
348 4 108 if @{$tree->{'children'};} <= $cur_child + 2
351 80 28 if ($link_node->{'type'} eq 'html') { }
357 2 106 if $target =~ /\n/u
365 3044 727 if (@target)
373 13 3031 $has_bracket ? :
384 38 3733 if ($n->{'content'} =~ /\G"/cgu) { }
4 3729 elsif ($n->{'content'} =~ /\G'/cgu) { }
63 3666 elsif ($n->{'content'} =~ /\G\(/cgu) { }
392 47 3724 if (@end_title)
393 0 47 unless $ok_to_have_title
406 1805 1966 unless $n->{'content'} =~ /\G\)/u
417 24 1942 if (@title)
424 1966 0 if (@target)
426 1964 2 unless $target
432 24 1942 $title ? :
443 480 154 if (my(@end_ref) = $tree->find_in_text(qr/]/u, $cur_child, $start[3]))
446 45 435 if (my $l = get_linkref($that, $linkrefs, $ref)) { }
463 161 28146 if (exists $linkrefs->{$ref}) { }
7 28139 elsif (exists $that->{'hooks'}{'resolve_link_ref'}) { }
482 2133 96426 if exists $n->{'subtree'}
483 28948 69611 unless $n->{'type'} eq "text"
487 48973 20638 if ($that->get_two_spaces_hard_line_breaks) { }
495 42845 34621 if not $not_root and $i == 0 and $j == 0
498 42088 35378 if not $not_root and $i == $#{$$tree{"children"};} and $j == $#hard_breaks
499 69611 10186 if ($j == 0) { }
526 2133 117534 if exists $c->{'subtree'}
544 41177 2 if (not exists $max_delim_run_length{$d->{'delim'}} or $d->{'len'} <= $max_delim_run_length{$d->{'delim'}})
574 8791 32388 if ($delim eq '_') { }
599 3352 79006 if $index == 0 and $side eq "left"
600 3079 75927 if $index == $#{$$tree{"children"};} and $side eq "right"
601 37827 38100 $side eq 'left' ? :
604 4054 71873 if $node->{'type'} ne "text" and $node->{'type'} ne "literal"
605 36301 35572 $side eq 'left' ? :
606 8090 63783 if $node->{'content'} =~ /$space_re/u
607 31260 32523 $side eq 'left' ? :
608 39924 23859 if $node->{'content'} =~ /$punct_re/u
619 4794 16391 unless $c{'can_close'}
628 11638 4173 if $_->{'can_open'} and $_->{'delim'} eq $c{'delim'}
637 6072 10319 if $open_index == -1
675 327 9992 if ($len < $o{'len'}) { }
684 426 9893 if ($len < $c{'len'}) { }
696 327 9992 $len < $o{'len'} ? :
741 10314 5 exists $that->get_inline_delimiters->{$delim x 2} ? :
746 18506 40725 if ($n->{'type'} ne "text")
771 5 1252 if ($url =~ /\)+$/u)
776 3 2 if ($remove > 0)
781 3 1254 if ($url =~ /\&[a-zA-Z0-9]+;$/u)
786 756 501 if ($match_start > 0)
789 595 662 $has_scheme ? :
794 39445 1280 if length $n->{'content'} > 0
800 19763 40201 if ($n->{'type'} ne "text")
825 1 4 if ($match_start > 0)
828 0 5 $has_scheme ? :
837 40198 3 if length $n->{'content'} > 0