Condition Coverage

blib/lib/Text/HTML/CollapseWhitespace.pm
Criterion Covered Total %
condition 34 43 79.0


and 3 conditions

line !l l&&!r l&&r condition
70 14 8 622 !$prevText || $prevText->data =~ / $/u and not $keepLeadingWs
22 253 369 !$prevText || $prevText->data =~ / $/u and not $keepLeadingWs and substr($text, 0, 1) eq " "
150 329 843 666 $prev and $prev->parentNode->isEqual($current)

or 2 conditions

line l !l condition
51 165 0 $options{'isBlock'} // \&Text::HTML::Turndown::Node::_isBlock
52 165 0 $options{'isVoid'} // \&Text::HTML::Turndown::Node::_isVoid

or 3 conditions

line l !l&&r !l&&!r condition
55 5 160 0 $options{'isPre'} || sub ($node) { return uc $node->nodeName eq 'PRE'; }
58 0 0 165 not $element->firstChild or &$isPre($element)
67 644 0 1557 $node->nodeType == 3 or $node->nodeType == 4
70 614 16 14 !$prevText || $prevText->data =~ / $/u
85 1250 5 136 &$isBlock($node) or uc $node->nodeName eq "BR"
13 5 118 &$isVoid($node) or &$isPre($node)
128 381 147 0 $node->nextSibling || $node->parentNode
150 666 25 1147 $prev and $prev->parentNode->isEqual($current) or &$isPre($current)
151 278 413 0 $current->nextSibling || $current->parentNode
154 876 271 0 $current->firstChild || $current->nextSibling || $current->parentNode