Branch Coverage

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


line true false branch
58 0 167 if not $element->firstChild or &$isPre($element)
67 647 1575 if ($node->nodeType == 3 or $node->nodeType == 4) { }
1407 168 elsif ($node->nodeType == 1) { }
70 369 263 if (!$prevText || $prevText->data =~ / $/u and not $keepLeadingWs and substr($text, 0, 1) eq " ")
76 362 285 unless ($text)
85 1264 143 if (&$isBlock($node) or uc $node->nodeName eq 'BR') { }
19 124 elsif (&$isVoid($node) or &$isPre($node)) { }
78 46 elsif ($prevText) { }
86 252 1012 if ($prevText)
109 0 167 if ($prevText)
111 0 0 unless ($prevText->{'data'})
150 698 1161 if ($prev and $prev->parentNode->isEqual($current) or &$isPre($current))