Branch Coverage

blib/lib/Markdent/Parser/SpanParser.pm
Criterion Covered Total %
branch 112 130 86.1


line true false branch
147 4 35 unless defined $uri
151 16 23 if defined $title
161 0 1095 if $self->debug
191 0 3073 if ($self->debug and pos ${$text;})
197 1127 1946 if (${$text;} =~ /\G\z/cg)
207 356 16979 ref $span ? :
211 393 16942 if $self->$meth($text, @args)
223 199 1811 if (my $event = $open{'code'})
233 1768 43 unless ($open{'link'})
248 18 1793 if ($open{'strong'} and $open{'emphasis'}) { }
92 1701 elsif ($open{'emphasis'}) { }
45 1656 elsif ($open{'strong'}) { }
252 20 66 if ($event_name eq 'start_strong') { }
22 44 elsif ($event_name eq 'start_emphasis') { }
261 0 18 $last_saw eq 'strong' ? :
294 1228 6360 if $wanted_start{$event_name}
297 813 6775 if $wanted_end{$event_name}
334 1738 9 unless ${$text;} =~ / \G
338 0 9 if $self->debug
350 1657 18 unless my($delim) = $self->_match_delimiter_start($text, qr/(?:\*\*|__)/)
365 45 12 unless $self->_match_delimiter_end($text, qr/\Q$delim\E/)
379 1558 50 unless my($delim) = $self->_match_delimiter_start($text, $self->_emphasis_start_delimiter_re)
396 54 46 unless $self->_match_delimiter_end($text, $self->_emphasis_end_delimiter_re($delim))
421 1520 92 unless my($delim) = $self->_match_delimiter_start($text, qr/\`+\p{SpaceSeparator}*/)
439 109 90 unless $self->_match_delimiter_end($text, qr/\p{SpaceSeparator}*\Q$delim\E/)
454 4735 160 unless ${$text;} =~ / \G ($delim)/cgx
464 208 148 unless ${$text;} =~ /\G $delim /cgx
473 1482 1 unless ${$text;} =~ /\G <( (?:https?|mailto|ftp): [^>]+ ) >/cgx
517 1444 38 unless ${$text;} =~ / \G
529 6 32 unless (defined $attr->{'uri'})
530 6 0 if defined $pos
556 1441 9 unless ${$text;} =~ / \G
569 1 8 unless (defined $attr->{'uri'})
570 1 0 if defined $pos
593 14 33 if (defined $uri_and_title) { }
597 4 10 if defined $title
601 11 22 unless (defined $id and length $id)
611 12 21 if defined $link->[1]
624 1478 1 unless ${$text;} =~ / \G
646 1459 19 unless ${$text;} =~ /\G (< [^>]+ >)/cgx
651 8 11 if ($tag =~ m[^</(\w+)>$]) { }
661 3 8 if ($InlineTags{$tag_name}) { }
698 4 7 unless defined $text and length $text
704 12 6 if ($text =~ /$q/cg)
720 1452 7 unless ${$text;} =~ / \G
737 1449 3 unless ${$text;} =~ /\G$line_break_re/cgs
760 0 1553 unless ${$text;} =~ /\G
781 0 1553 if $self->debug
805 0 416 if ($self->debug)
808 0 0 if ($event->can('delimiter'))
819 188 228 if $event->is_end
826 70 1473 unless $self->_has_span_text_buffer
852 2239 1095 unless $event->does('Markdent::Role::BalancedEvent')
854 560 535 if ($event->is_start) { }
535 0 elsif ($event->is_end) { }
860 535 0 if $event->balances_event($start->[1])
868 188 1095 unless $is_done
880 0 12 if ($self->debug)
883 0 0 if ($event->can('delimiter'))
911 1485 404 if ($event->event_name eq 'text') { }
912 1469 16 unless defined $merge_start
916 5 399 if defined $merge_start and $i - 1 > $merge_start
926 6 1089 if defined $merge_start and $#{$events;} > $merge_start
952 0 11 if $self->debug
971 2190 0 unless $self->debug