Parsoid
A bidirectional parser between wikitext and HTML5
Loading...
Searching...
No Matches
Wikimedia\Parsoid\Wt2Html\DOM\Processors\ComputeDSR Class Reference
+ Inheritance diagram for Wikimedia\Parsoid\Wt2Html\DOM\Processors\ComputeDSR:
+ Collaboration diagram for Wikimedia\Parsoid\Wt2Html\DOM\Processors\ComputeDSR:

Public Member Functions

 run (Env $env, Node $root, array $options=[], bool $atTopLevel=false)
 Computes DSR ranges for every node of a DOM tree.
 

Member Function Documentation

◆ run()

Wikimedia\Parsoid\Wt2Html\DOM\Processors\ComputeDSR::run ( Env $env,
Node $root,
array $options = [],
bool $atTopLevel = false )

Computes DSR ranges for every node of a DOM tree.

This pass is only invoked on the top-level page.

Parameters
Env$envThe environment/context for the parse pipeline
Node$rootThe root of the tree for which DSR has to be computed
array$optionsOptions governing DSR computation
  • sourceOffsets: [start, end] source offset. If missing, this defaults to [0, strlen($frame->getSrcText())]
  • attrExpansion: Is this an attribute expansion pipeline?
bool$atTopLevelAre we running this on the top level?

Implements Wikimedia\Parsoid\Wt2Html\Wt2HtmlDOMProcessor.


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