Branch Coverage

blib/lib/Text/MultiMarkdown.pm
Criterion Covered Total %
branch 136 162 83.9


line true false branch
211 21 6 unless exists $p{'use_metadata'}
213 24 3 $p{'use_metadata'} ? :
217 27 0 unless defined $p{'tab_width'} and $p{'tab_width'} =~ /^\d+$/
227 4 23 $p{'use_wikilinks'} ? :
229 1 26 defined $p{'heading_ids'} ? :
230 0 27 defined $p{'img_ids'} ? :
252 2 87 unless (ref $self)
253 1 1 if ($self ne 'Text::MultiMarkdown') { }
303 82 5 if $self->{'use_metadata'} or $self->{'strip_metadata'}
316 84 3 unless $self->{'disable_bibliography'}
317 84 3 unless $self->{'disable_footnotes'}
324 84 3 unless $self->{'disable_footnotes'}
325 84 3 unless $self->{'disable_footnotes'}
326 84 3 unless $self->{'disable_bibliography'}
331 4 83 if (lc($self->{'document_format'}) =~ /^complete\s*$/) { }
351 13 750 if ($self->_UseWikiLinks)
380 249 0 unless $self->{'disable_definition_lists'}
435 2 2 unless ($term =~ /^\s*$/)
464 24 2 $self->{'heading_ids'} ? :
467 24 2 if ($label ne "")
480 3 365 if ($self->_UseWikiLinks)
499 84 3 unless $self->{'disable_footnotes'}
535 12 33 if ($3)
541 4 41 if ($4)
559 96 64 if (defined $link_id)
561 8 88 if (defined $self->{'_crossrefs'}{$label})
564 11 85 if (defined $self->{'_titles'}{$label})
578 6 0 if (defined $alt_text and length $alt_text)
581 6 0 $self->{'img_ids'} ? :
584 4 2 if defined $link_id
602 0 1110 if $line =~ /^\s*$/ and $inMetaData = 0 and $clean_text .= $line
603 99 2974 if ($inMetaData) { }
604 2 97 unless $self->{'use_metadata'}
605 33 64 if ($line =~ /^([a-zA-Z0-9][0-9a-zA-Z _-]+?):\s*(.*)$/) { }
608 33 0 defined $2 ? :
609 2 31 if (lc $currentKey eq "format")
612 5 28 if (lc $currentKey eq "base url")
615 0 33 if (lc $currentKey eq "bibliography title")
621 63 1 if ($currentKey eq "")
627 1 0 if ($line =~ /^\s*(.+)$/)
669 2 5 if ($link_id eq "")
675 4 3 if (defined $self->{'_urls'}{$link_id})
742 0 84 unless length $text
760 7 0 if (defined $self->{'_footnotes'}{$id})
762 0 7 if ($self->{'_footnotes'}{$id} =~ /^glossary:/i) { }
796 0 7 unless defined $footnote_closing_tag
798 0 7 if ($footnote =~ s/^glossary:\s*//i) { }
809 0 0 if ($2)
823 4 80 if ($footnote_counter > 0) { }
862 3 12 if (lc $key eq 'title') { }
3 9 elsif (lc $key eq 'css') { }
1 8 elsif (lc $key eq 'xhtml header') { }
885 2 81 if $self->{'strip_metadata'}
892 9 72 if ($result ne "")
901 12 1132 if $self->{'use_wikilinks'}
903 1115 17 unless $k
904 17 0 if $self->{'_metadata'}{$k}
928 13 0 if ($self->_UseWikiLinks)
974 4 142 if $self->{'disable_tables'}
1033 2 1 if ($table =~ s/^$line_start\[\s*(.*?)\s*\](\[\s*(.*?)\s*\])?[ \t]*$//m)
1034 2 0 if (defined $3) { }
1052 0 3 if ($table =~ s/\n$line_start\[\s*(.*?)\s*\][ \t]*\n/\n/s)
1072 4 4 if ($cell =~ /\:$/) { }
1073 2 2 if ($cell =~ /^\:/) { }
1083 0 4 if ($cell =~ /^\:/) { }
1088 0 4 if ($cell =~ /^\./ or $cell =~ /\.$/) { }
1117 1 7 if ($ending =~ s/^\s*(\|{2,})\s*$/$1/)
1121 3 5 if ($count == 0)
1122 1 2 if ($cell =~ /^\s*$/) { }
1140 2 11 if ($line =~ /^\s*$/)
1153 0 27 if ($count == 0 and $use_row_header == 1)
1156 6 21 if ($ending =~ s/^\s*(\|{2,})\s*$/$1/)
1159 14 13 if (not $alignments[$count] =~ /^\s*$/) { }
1195 6 94 if (defined $self->{'_attributes'}{$id})
1245 6 0 if (defined $self->{'_references'}{$id}) { }
1251 3 9 if $old_id eq $id
1254 3 3 unless (defined $count)
1261 5 1 if ($anchor_text ne "")
1271 0 0 if ($anchor_text ne "")
1278 1 5 if ($self->_Header2Label($anchor_text) eq "notcited")
1298 1 83 if ($citation_counter > 0) { }