Branch Coverage

blib/lib/Markdown/Perl/BlockParser.pm
Criterion Covered Total %
branch 230 248 92.7


line true false branch
62 37144 655175 if $AUTOLOAD eq "DESTROY"
63 0 655175 unless $AUTOLOAD =~ /^get_/u
75 24498 156692 if exists $this->{'forced_line'}
76 26805 129887 if pos $this->{'md'} == length $this->{'md'}
78 0 129887 unless $this->{'md'} =~ /\G([^\n\r]*)($eol_re)?/gu
80 1528 128359 if ($1 =~ /^[ \t]+$/u) { }
81 1173 355 if $this->get_preserve_white_lines
84 3779 12973 $this->get_force_final_new_line ? :
101 7846 14278 if defined $last_pos
112 0 9569 unless exists $this->{'last_pos'}
140 4235 13328 if $this->get_parse_file_metadata eq "yaml"
162 87946 37798 if (@{$this->{'paragraph'};} or $force_loose_test)
163 5920 82026 if ($this->{'last_line_was_blank'})
164 141 5779 if (@{$this->{'blocks_stack'};} and $this->{'blocks_stack'}[-1]{'block'}{'type'} eq "list_item")
170 71228 54516 unless @{$this->{'paragraph'};}
180 10126 25654 unless @{$this->{'blocks'};}
190 16898 20319 if ($block->{'type'} eq 'list_item') { }
193 2697 14201 if ($this->_list_match($block)) { }
221 28448 2498 if (defined $forced_next_line)
252 6687 23804 unless @{$this->{'paragraph'};}
256 23804 0 @{$this->{'paragraph'};} ? :
265 12837 10967 if (@{$tester->{'paragraph'};})
278 19101 20258 if defined $r and $r > 0
279 20011 19348 unless $r
330 124196 24498 if (not $this->{'skip_next_block_matching'}) { }
332 18265 105931 if (@{$this->{'blocks_stack'};} > $matched_block)
347 14906 133788 if ($this->{'last_line_is_blank'})
348 598 14308 if (@{$this->{'blocks_stack'};} and $this->{'blocks_stack'}[-1]{'block'}{'type'} eq "list_item")
356 0 107059 unless _do_atx_heading($this) or $this->get_use_setext_headings and _do_setext_heading($this) or _do_thematic_break($this) or _do_indented_code_block($this) or $this->get_use_fenced_code_blocks and _do_fenced_code_block($this) or _do_html_block($this) or _do_block_quotes($this) or _do_list_item($this) or _do_directive_block($this) or _do_link_reference_definition($this) or $this->get_use_table_blocks and _do_table_block($this) or _do_paragraph($this)
376 0 1 unless (eval "require $module_name; 1")
386 8 1 if ($parser eq 'YAML::Tiny') { }
1 0 elsif ($parser eq 'YAML::PP' or $parser eq 'YAML::PP::LibYAML') { }
399 2 4233 $this->get_yaml_file_metadata_allows_empty_lines ? :
400 9 4226 if ($this->{'md'} =~ / ^ ---\n (? (?: $line_re )+? ) (?: --- | \.\.\. ) \n /cgux)
402 2 7 if ($Markdown::Perl::BlockParser::EVAL_ERROR)
404 2 0 if $this->get_warn_for_unused_input
407 5 2 if (exists $this->{'pmarkdown'}{'hooks'}{'yaml_metadata'})
417 489 148205 if ($l =~ /^ \ {0,3} (\#{1,6}) (?:[ \t]+(.+?))?? (?:[ \t]+\#+)? [ \t]* $/ux)
434 101434 1679 unless $l =~ /^ {0,3}(-+|=+)[ \t]*$/u
435 338 543 if (not @{$this->{'paragraph'};} or indent_size($this->{'paragraph'}[0]) >= 4 or $this->{'is_lazy_continuation'})
444 1 542 if ($m eq 'single_line' and @{$p;} > 1) { }
1 541 elsif ($m eq 'break' and $l =~ /$thematic_break_re/u) { }
1 540 elsif ($m eq 'ignore') { }
458 36 505 $c eq '=' ? :
470 147330 332 unless ($l =~ /$thematic_break_re/u)
481 146279 1051 if (@{$this->{'paragraph'};} or not $l =~ /$indented_code_re/u)
485 213 838 if $convert_tabs
491 808 238 if ($this->_all_blocks_match(\$nl)) { }
493 69 739 if ($nl =~ /$indented_code_re/u) { }
151 588 elsif ($nl eq '') { }
496 6 63 if $convert_tabs
517 98700 10571 unless $l =~ /^ (?\ {0,3}) (?`{3,}|~{3,}) [ \t]* (?.*?) [ \t]* $/ux
519 1579 8992 if ($f eq "`" and index($+{'info'}, "`") != -1)
535 22915 887 if ($this->_all_blocks_match(\$nl)) { }
536 443 22472 if ($nl =~ /^ {0,3}${f}{$fl,}[ \t]*$/u) { }
547 157 730 unless $this->get_fenced_code_blocks_must_be_closed
552 3658 5334 if (not $end_fence_seen and $this->get_fenced_code_blocks_must_be_closed)
574 16 140929 if ($l =~ / ^\ {0,3} < (?:pre|script|style|textarea) (?:\ |\t|>|$) /ux) { }
10 140919 elsif ($l =~ /^ {0,3}