Parsoid
A bidirectional parser between wikitext and HTML5
Loading...
Searching...
No Matches
Wikimedia\Parsoid\Html2Wt\Separators Class Reference

Public Member Functions

 updateSeparatorConstraints (Node $nodeA, DOMHandler $sepHandlerA, Node $nodeB, DOMHandler $sepHandlerB)
 Figure out separator constraints and merge them with existing constraints in state so that they can be emitted when the next content emits source.
 
 __construct (Env $env, SerializerState $state)
 
 recoverTrimmedWhitespace (Node $node, bool $leading)
 Emit a separator based on the collected (and merged) constraints and existing separator text.
 
 buildSep (Node $node)
 Emit a separator based on the collected (and merged) constraints and existing separator text.
 

Static Public Member Functions

static debugOut (Node $node)
 

Member Function Documentation

◆ buildSep()

Wikimedia\Parsoid\Html2Wt\Separators::buildSep ( Node $node)

Emit a separator based on the collected (and merged) constraints and existing separator text.

Called when new output is triggered.

Parameters
Node$node
Returns
string|null

◆ recoverTrimmedWhitespace()

Wikimedia\Parsoid\Html2Wt\Separators::recoverTrimmedWhitespace ( Node $node,
bool $leading )

Emit a separator based on the collected (and merged) constraints and existing separator text.

Called when new output is triggered.

Parameters
Node$node
bool$leadingif true, trimmed leading whitespace is emitted if false, trimmed railing whitespace is emitted
Returns
string|null

◆ updateSeparatorConstraints()

Wikimedia\Parsoid\Html2Wt\Separators::updateSeparatorConstraints ( Node $nodeA,
DOMHandler $sepHandlerA,
Node $nodeB,
DOMHandler $sepHandlerB )

Figure out separator constraints and merge them with existing constraints in state so that they can be emitted when the next content emits source.

Parameters
Node$nodeA
DOMHandler$sepHandlerA
Node$nodeB
DOMHandler$sepHandlerB

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