Parsoid
A bidirectional parser between wikitext and HTML5
Loading...
Searching...
No Matches
Wikimedia\Parsoid\Wt2Html\PP\Handlers\CleanUp Class Reference

Static Public Member Functions

static stripMarkerMetas (Element $node)
 
static handleEmptyElements (Node $node, DTState $state)
 
static finalCleanup (Node $node, DTState $state)
 Perform some final cleanup.
 
static saveDataParsoid (array $usedIdIndex, Node $node, Env $env, DTState $state)
 Perform some final cleanup.
 

Public Attributes

const ALLOWED_TPL_WRAPPER_ATTRS
 

Member Function Documentation

◆ finalCleanup()

static Wikimedia\Parsoid\Wt2Html\PP\Handlers\CleanUp::finalCleanup ( Node $node,
DTState $state )
static

Perform some final cleanup.

Parameters
Node$node
DTState$state
Returns
bool|Node The next node or true to continue with $node->nextSibling

◆ handleEmptyElements()

static Wikimedia\Parsoid\Wt2Html\PP\Handlers\CleanUp::handleEmptyElements ( Node $node,
DTState $state )
static
Parameters
Node$node
DTState$state
Returns
bool|Node

The node is known to be empty and a deletion candidate

  • If node is part of template content and is not the first encapsulation wrapper node, it can be deleted.
  • If not, we add the mw-empty-elt class so that wikis can decide what to do with them.

◆ saveDataParsoid()

static Wikimedia\Parsoid\Wt2Html\PP\Handlers\CleanUp::saveDataParsoid ( array $usedIdIndex,
Node $node,
Env $env,
DTState $state )
static

Perform some final cleanup.

Parameters
array$usedIdIndex
Node$node
Env$env
DTState$state
Returns
bool|Node The next node or true to continue with $node->nextSibling

◆ stripMarkerMetas()

static Wikimedia\Parsoid\Wt2Html\PP\Handlers\CleanUp::stripMarkerMetas ( Element $node)
static
Parameters
Element$node
Returns
bool|Element

Member Data Documentation

◆ ALLOWED_TPL_WRAPPER_ATTRS

const Wikimedia\Parsoid\Wt2Html\PP\Handlers\CleanUp::ALLOWED_TPL_WRAPPER_ATTRS
Initial value:
= [
'about' => 1,
'typeof' => 1,
]

The documentation for this class was generated from the following file: