Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. TreeBuildingRules.php

function 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 117

Class

TreeBuildingRules
Handles special-case rules for the DOM tree builder.

Namespace

Masterminds\HTML5\Parser

Code

protected function closeIfCurrentMatches($ele, $current, $match) {
    if (in_array($current->tagName, $match, true)) {
        $current->parentNode
            ->appendChild($ele);
    }
    else {
        $current->appendChild($ele);
    }
    return $ele;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal