Parsoid
A bidirectional parser between wikitext and HTML5
|
DOM pass that walks the DOM tree, detects specific wikitext patterns, and emits them as linter events. More...
Public Member Functions | |||||||||||||
run (Env $env, Node $root, array $options=[], bool $atTopLevel=false) | |||||||||||||
This is only invoked on the top-level document
| |||||||||||||
Static Public Member Functions | |
static | findEnclosingTemplateName (Env $env, ?stdClass $tplInfo) |
Given a tplInfo object, determine whether we are: | |
static | findLintDSR (?array $tplLintInfo, ?stdClass $tplInfo, ?DomSourceRange $nodeDSR, ?callable $updateNodeDSR=null) |
Compute the DSR information for the lint object. | |
DOM pass that walks the DOM tree, detects specific wikitext patterns, and emits them as linter events.
|
static |
Given a tplInfo object, determine whether we are:
FIXME: We might potentially be computing this information redundantly for every lint we find within this template's content. It could probably be cached in tplInfo after it is computed once.
|
static |
Compute the DSR information for the lint object.
Wikimedia\Parsoid\Wt2Html\DOM\Processors\Linter::run | ( | Env | $env, |
Node | $root, | ||
array | $options = [], | ||
bool | $atTopLevel = false ) |
This is only invoked on the top-level document
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.