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

Static Public Member Functions

static getDiffMark (Node $node, Env $env)
 Get a node's diff marker.
 
static hasDiffMarkers (Node $node, Env $env)
 Check that the diff markers on the node exist and are recent.
 
static hasDiffMark (Node $node, Env $env, string $mark)
 
static hasInsertedDiffMark (Node $node, Env $env)
 
static maybeDeletedNode (?Node $node)
 
static isDeletedBlockNode (?Node $node)
 Is node a mw:DiffMarker node that represents a deleted block node? This annotation is added by the DOMDiff pass.
 
static directChildrenChanged (Node $node, Env $env)
 
static onlySubtreeChanged (Element $node, Env $env)
 
static addDiffMark (Node $node, Env $env, string $mark)
 
static setDiffMark (Node $node, Env $env, string $change)
 Set a diff marker on a node.
 
static prependTypedMeta (Node $node, string $type)
 Insert a meta element with the passed-in typeof attribute before a node.
 
static attribsEquals (Element $nodeA, Element $nodeB, array $ignoreableAttribs, array $specializedAttribHandlers)
 Attribute equality test.
 

Member Function Documentation

◆ addDiffMark()

static Wikimedia\Parsoid\Html2Wt\DiffUtils::addDiffMark ( Node $node,
Env $env,
string $mark )
static
Parameters
Node$node
Env$env
string$mark

◆ attribsEquals()

static Wikimedia\Parsoid\Html2Wt\DiffUtils::attribsEquals ( Element $nodeA,
Element $nodeB,
array $ignoreableAttribs,
array $specializedAttribHandlers )
static

Attribute equality test.

Parameters
Element$nodeA
Element$nodeB
array$ignoreableAttribs
array$specializedAttribHandlers
Returns
bool

◆ directChildrenChanged()

static Wikimedia\Parsoid\Html2Wt\DiffUtils::directChildrenChanged ( Node $node,
Env $env )
static
Parameters
Node$node
Env$env
Returns
bool

◆ getDiffMark()

static Wikimedia\Parsoid\Html2Wt\DiffUtils::getDiffMark ( Node $node,
Env $env )
static

Get a node's diff marker.

Parameters
Node$node
Env$env
Returns
stdClass|null

◆ hasDiffMark()

static Wikimedia\Parsoid\Html2Wt\DiffUtils::hasDiffMark ( Node $node,
Env $env,
string $mark )
static
Parameters
Node$node
Env$env
string$mark
Returns
bool

◆ hasDiffMarkers()

static Wikimedia\Parsoid\Html2Wt\DiffUtils::hasDiffMarkers ( Node $node,
Env $env )
static

Check that the diff markers on the node exist and are recent.

Parameters
Node$node
Env$env
Returns
bool

◆ hasInsertedDiffMark()

static Wikimedia\Parsoid\Html2Wt\DiffUtils::hasInsertedDiffMark ( Node $node,
Env $env )
static
Parameters
Node$node
Env$env
Returns
bool

◆ isDeletedBlockNode()

static Wikimedia\Parsoid\Html2Wt\DiffUtils::isDeletedBlockNode ( ?Node $node)
static

Is node a mw:DiffMarker node that represents a deleted block node? This annotation is added by the DOMDiff pass.

Parameters
?Node$node
Returns
bool

◆ maybeDeletedNode()

static Wikimedia\Parsoid\Html2Wt\DiffUtils::maybeDeletedNode ( ?Node $node)
static
Parameters
?Node$node
Returns
bool

◆ onlySubtreeChanged()

static Wikimedia\Parsoid\Html2Wt\DiffUtils::onlySubtreeChanged ( Element $node,
Env $env )
static
Parameters
Element$node
Env$env
Returns
bool

◆ prependTypedMeta()

static Wikimedia\Parsoid\Html2Wt\DiffUtils::prependTypedMeta ( Node $node,
string $type )
static

Insert a meta element with the passed-in typeof attribute before a node.

Parameters
Node$node
string$type
Returns
Element

◆ setDiffMark()

static Wikimedia\Parsoid\Html2Wt\DiffUtils::setDiffMark ( Node $node,
Env $env,
string $change )
static

Set a diff marker on a node.

Parameters
Node$node
Env$env
string$change

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