Branch Coverage

lib/Wiki/JSON/HTML.pm
Criterion Covered Total %
branch 96 126 76.1


line true false branch
37 0 377 if (@_ < 2)
43 0 377 if ("HASH" ne ref $attributes)
47 16 361 $self_closing ? :
54 0 361 if (@_ != 2)
73 0 167 if (@_ != 6)
82 114 53 if ("HASH" ne ref $element)
84 106 8 unless ($last_element_inline_element)
89 114 0 if ($element)
90 106 8 unless ($last_element_inline_element)
103 0 47 if (@_ < 7)
110 3 44 if ($element->{'type'} eq "italic")
130 0 48 if (@_ < 7)
137 1 47 if ($element->{'type'} eq "bold_and_italic")
159 0 53 if (@_ < 7)
166 5 48 if ($element->{'type'} eq "bold")
187 0 15 if (@_ < 6)
194 3 12 if ($element->{'type'} eq "link")
200 3 0 unless ($real_link =~ /^\w:/u or $real_link =~ m[^(?:/|\w+\.)]u)
217 0 12 if (@_ < 6)
224 8 4 if ($element->{'type'} eq "image")
230 3 5 if ($is_inline) { }
237 0 5 if ($options->{'inside_inline_element'})
253 1 1 if (defined $element->{'options'}{'page'})
257 1 1 if (defined $fragment)
263 3 5 if ($is_inline)
264 0 3 if ($is_pdf)
271 1 2 if ($is_video)
282 2 0 defined $alt ? :
293 1 4 if ($format->{'thumb'})
301 2 3 if ($is_pdf)
308 1 2 if ($is_video)
318 1 1 defined $alt ? :
331 5 0 if (defined $element->{'caption'})
347 4 0 if ($element->{'type'} eq "template")
350 0 4 if ($options->{'inside_inline_element'} and not $is_inline)
355 3 1 if ($is_inline) { }
373 0 4 unless (defined $tag)
382 0 4 unless (defined $tag)
391 4 0 if (defined $new_elements)
393 0 4 if ("ARRAY" ne ref $new_elements)
406 0 16 if (@_ < 6)
413 1 15 if ($element->{'type'} eq "unordered_list")
414 1 0 if ($options->{'inside_inline_element'})
424 0 4 if ("HASH" ne ref $element)
427 0 4 if ($element->{'type'} ne "list_element")
447 0 44 if (@_ < 6)
454 28 16 if ($element->{'type'} eq "hx")
455 0 28 if ($options->{'inside_inline_element'})
479 0 93 if (@_ < 3)
501 114 53 if $needs_next
507 5 48 if $needs_next
512 1 47 if $needs_next
517 3 44 if $needs_next
521 28 16 if $needs_next
526 1 15 if $needs_next
530 3 12 if $needs_next
534 8 4 if $needs_next
539 0 4 if $needs_next
551 0 124 if (@_ < 5)
557 45 79 if ($options->{'is_list_element'} or $options->{'inside_inline_element'})
558 2 3 unless ($options->{'first'} or $found_inline_element)
563 70 9 unless ($needs_closing_parragraph)
572 70 164 if ($needs_closing_parragraph)