Parsoid
A bidirectional parser between wikitext and HTML5
|
This is a stage inserted between RemexHtml's TreeBuilder and our DOMBuilder subclass. More...
Public Member Functions | |
__construct (DOMBuilder $nextHandler) | |
matchStartTag (Attributes $attribs) | |
Start watching for a start tag with the given Attributes object. | |
matchEndTag (int $sourceLength, bool $isHTML) | |
Start watching for an end tag with the given fake source length. | |
resetMatch () | |
Stop looking for a matching element. | |
getMatchedElement () | |
If an element was matched, return the element object from the DOM. | |
insertElement ( $preposition, $ref, Element $element, $void, $sourceStart, $sourceLength) | |
Set autoInsertedStart on auto-inserted nodes and forward the event to DOMBuilder. | |
This is a stage inserted between RemexHtml's TreeBuilder and our DOMBuilder subclass.
Any code that needs to modify the tree mutation event stream should go here. It's currently used for auto-insert detection.
Wikimedia\Parsoid\Wt2Html\TreeBuilder\TreeMutationRelay::getMatchedElement | ( | ) |
If an element was matched, return the element object from the DOM.
Wikimedia\Parsoid\Wt2Html\TreeBuilder\TreeMutationRelay::insertElement | ( | $preposition, | |
$ref, | |||
Element | $element, | ||
$void, | |||
$sourceStart, | |||
$sourceLength ) |
Set autoInsertedStart on auto-inserted nodes and forward the event to DOMBuilder.
int | $preposition | |
Element | null | $ref | |
Element | $element | |
bool | $void | |
int | $sourceStart | |
int | $sourceLength |
Wikimedia\Parsoid\Wt2Html\TreeBuilder\TreeMutationRelay::matchEndTag | ( | int | $sourceLength, |
bool | $isHTML ) |
Start watching for an end tag with the given fake source length.
int | $sourceLength | |
bool | $isHTML | $dp->stx=='html', which helps us decide whether to set autoInsertedEnd |