protected function TreeBuildingRules::closeIfCurrentMatches in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/masterminds/html5/src/HTML5/Parser/TreeBuildingRules.php \Masterminds\HTML5\Parser\TreeBuildingRules::closeIfCurrentMatches()
4 calls to TreeBuildingRules::closeIfCurrentMatches()
- TreeBuildingRules::evaluate in vendor/
masterminds/ html5/ src/ HTML5/ Parser/ TreeBuildingRules.php - Evaluate the rule for the current tag name.
- TreeBuildingRules::handleDT in vendor/
masterminds/ html5/ src/ HTML5/ Parser/ TreeBuildingRules.php - TreeBuildingRules::handleLI in vendor/
masterminds/ html5/ src/ HTML5/ Parser/ TreeBuildingRules.php - TreeBuildingRules::handleRT in vendor/
masterminds/ html5/ src/ HTML5/ Parser/ TreeBuildingRules.php
File
- vendor/
masterminds/ html5/ src/ HTML5/ Parser/ TreeBuildingRules.php, line 129
Class
- TreeBuildingRules
- Handles special-case rules for the DOM tree builder.
Namespace
Masterminds\HTML5\ParserCode
protected function closeIfCurrentMatches($ele, $current, $match) {
$tname = $current->tagName;
if (in_array($current->tagName, $match)) {
$current->parentNode
->appendChild($ele);
}
else {
$current
->appendChild($ele);
}
return $ele;
}