Branch Coverage

blib/lib/Text/HTML/CollapseWhitespace.pm
Criterion Covered Total %
branch 20 24 83.3


line true false branch
58 0 165 if not $element->firstChild or &$isPre($element)
67 644 1557 if ($node->nodeType == 3 or $node->nodeType == 4) { }
1391 166 elsif ($node->nodeType == 1) { }
70 369 261 if (!$prevText || $prevText->data =~ / $/u and not $keepLeadingWs and substr($text, 0, 1) eq " ")
76 362 282 unless ($text)
85 1255 136 if (&$isBlock($node) or uc $node->nodeName eq 'BR') { }
18 118 elsif (&$isVoid($node) or &$isPre($node)) { }
75 43 elsif ($prevText) { }
86 250 1005 if ($prevText)
109 0 165 if ($prevText)
111 0 0 unless ($prevText->{'data'})
150 691 1147 if ($prev and $prev->parentNode->isEqual($current) or &$isPre($current))