Branch Coverage

blib/lib/Markdown/Compiler/Parser.pm
Criterion Covered Total %
branch 96 172 55.8


line true false branch
95 421 0 if (ref $token eq 'HASH') { }
96 109 312 if ($token->{'children'} and @{$token->{'children'};} >= 1)
101 0 0 $token->can('data') && $token->data ? :
0 0 $token->can('href') && $token->href ? :
0 0 $token->can('title') && $token->title ? :
0 0 $token->can('size') && $token->size ? :
0 0 $token->can('text') && $token->text ? :
0 0 $token->can('language') && $token->language ? :
0 0 $token->can('content') && $token->content ? :
0 0 $token->can('children') && $token->children ? :
122 0 0 if ($self->tree->[0] and $self->tree->[0]{'class'} eq "Markdown::Compiler::Parser::Node::Metadata")
134 1 75 if ($token->type eq 'Header') { }
57 18 elsif (grep {$token->type eq $_;} 'EscapedChar', 'Image', 'Link', 'Word', 'Char', 'Bold', 'Italic', 'BoldItalic', 'InlineCode') { }
0 18 elsif ($token->type eq 'HR') { }
3 15 elsif ($token->type eq 'TableStart') { }
1 14 elsif ($token->type eq 'BlockQuote') { }
2 12 elsif ($token->type eq 'CodeBlock') { }
4 8 elsif ($token->type eq 'Item') { }
8 0 elsif (grep {$token->type eq $_;} 'LineBreak') { }
162 0 0 if ($token->start == 0)
245 7 300 if ($token->type eq "LineBreak")
246 5 2 if (exists $tokens->[0] and $tokens->[0]->type eq "LineBreak")
256 0 300 if (grep {$token->type eq $_;} "TableStart", "CodeBlock", "BlockQuote", "List", "HR", "Header")
263 272 28 if (grep {$token->type eq $_;} "EscapedChar", "Space", "Word", "Char")
272 9 19 if (grep {$token->type eq $_;} "Link")
283 4 15 if ($token->type eq "Image")
294 2 13 if ($token->type eq "InlineCode")
299 2 3 if $todo_token->type eq "InlineCode"
302 0 3 if ($todo_token->type eq "LineBreak")
326 0 13 if ($token->type eq "BoldItalic")
331 0 0 if $todo_token->type eq "BoldItalic"
334 0 0 if ($todo_token->type eq "LineBreak")
352 6 7 if ($token->type eq "Bold")
357 6 10 if $todo_token->type eq "Bold"
360 0 10 if ($todo_token->type eq "LineBreak")
378 7 0 if ($token->type eq 'Italic') { }
383 7 13 if $todo_token->type eq "Italic"
386 0 13 if ($todo_token->type eq "LineBreak")
419 0 3 if $token->type eq "LineBreak"
424 3 3 if $todo_token->type eq "Char" and $todo_token->content eq "|"
425 0 3 if $todo_token->type eq "LineBreak"
447 0 3 if $token->type eq "LineBreak"
452 3 3 if $todo_token->type eq "Char" and $todo_token->content eq "|"
453 0 3 if $todo_token->type eq "LineBreak"
479 7 13 if ($token->type eq "LineBreak")
480 0 7 unless @$tokens
481 3 4 if $tokens->[0]->type eq "LineBreak"
484 6 11 if ($token->type eq "TableStart")
489 0 24 if $todo_token->type eq "TableStart"
492 6 18 if ($todo_token->type eq "LineBreak")
501 3 3 if ($is_first_row) { }
559 2 5 if ($token->type eq "LineBreak")
560 1 1 unless @$tokens
561 0 1 if $tokens->[0]->type eq "LineBreak"
564 1 5 if $token->type eq "BlockQuote"
585 2 6 if ($token->type eq "CodeBlock")
627 12 13 if ($token->type eq "LineBreak")
632 1 12 if ($token->type eq "Link")
662 0 4 if ($token->type eq 'LineBreak') { }
4 0 elsif ($lvl == 0 and $token->type eq 'Item') { }
0 0 elsif ($token->type eq 'Item') { }
0 0 elsif ($token->type eq 'Space') { }
690 0 0 if ($token->length == $lvl) { }
0 0 elsif ($token->length < $lvl or $token->type eq 'Item') { }
0 0 elsif ($token->length > $lvl) { }
692 0 0 if ($token->type eq "Word")
694 0 0 if $tokens->[0]{'type'} eq "Space"
715 0 0 if ($token->content =~ /^\d+\.\s+$/) { }
752 0 11 if ($token->type eq 'LineBreak') { }
8 3 elsif ($lvl == 0 and $token->type eq 'Item') { }
1 2 elsif ($token->type eq 'Item') { }
2 0 elsif ($token->type eq 'Space') { }
780 1 1 if ($token->length == $lvl) { }
0 1 elsif ($token->length < $lvl or $token->type eq 'Item') { }
1 0 elsif ($token->length > $lvl) { }
782 1 0 if ($token->type eq "Char")
783 1 0 if $tokens->[0]->type eq "Space"
804 0 1 if ($token->content =~ /^\d+\.\s+$/) { }
843 0 4 if ($token->type eq "LineBreak")
844 0 0 if (exists $tokens->[0] and $tokens->[0]->type eq "LineBreak")
855 0 4 if (grep {$token->type eq $_;} "Char", "Word", "TableStart", "CodeBlock", "BlockQuote", "List", "HR", "Header")
860 4 0 if ($token->type eq "Item")
861 1 3 if ($token->content =~ /^\d+\.\s+$/) { }
917 0 0 if ($token->type eq "HR")
921 0 0 if (grep {$token->type eq $_;} "EscapedChar", "Space", "Word", "Char", "LineBreak")
971 0 0 if $token->children