|
| run (Env $env, Node $root, array $options=[], bool $atTopLevel=false) |
| Wrap children of <body> as well as children of
found anywhere in the DOM tree.
|
|
◆ pWrapOptional()
static Wikimedia\Parsoid\Wt2Html\DOM\Processors\PWrap::pWrapOptional |
( |
Node | $n | ) |
|
|
static |
Is a P-wrapper optional for this node?
The following nodes do not need p wrappers of their own:
- whitespace nodes
- comment nodes
- HTML metadata tags generated by wikitext (not always rendering-transparent) and these metatags don't need p-wrappers of their own. Both Remex and Parsoid have identical p-wrapping behavior on these tags. This is a superset of \MediaWiki\Tidy\RemexCompatMunger::$metadataElements.
- parsoid-added span wrappers around pwrap-optional nodes
- Parameters
-
- Returns
- bool
◆ run()
Wikimedia\Parsoid\Wt2Html\DOM\Processors\PWrap::run |
( |
Env | $env, |
|
|
Node | $root, |
|
|
array | $options = [], |
|
|
bool | $atTopLevel = false ) |
Wrap children of <body> as well as children of
found anywhere in the DOM tree.
- Parameters
-
Env | $env | |
Element | DocumentFragment | $root | The root of the tree to process |
array | $options | |
bool | $atTopLevel | Is this processor invoked on the top level page? If false, this is being invoked in a sub-pipeline (ex: extensions) |
Implements Wikimedia\Parsoid\Wt2Html\Wt2HtmlDOMProcessor.
The documentation for this class was generated from the following file:
- src/Wt2Html/DOM/Processors/PWrap.php