Parsoid
A bidirectional parser between wikitext and HTML5
Loading...
Searching...
No Matches
Wikimedia\Parsoid\Wt2Html\TreeBuilder\RemexPipeline Class Reference

Public Member Functions

 __construct (Env $env)
 Create a RemexHtml pipeline.
 
 insertUnfosteredMeta (array $attribs)
 Dispatch a meta tag in such a way that it won't be fostered even if the currently open element is a table.
 
 insertImplicitStartTag (string $name, array $attribs, bool $selfClose=false)
 Dispatch a start tag and consider the generated element to be auto-inserted.
 
 insertExplicitStartTag (string $name, array $attribs, bool $selfClose=false)
 Dispatch a start tag and consider the generated element to be explicit, not auto-inserted.
 
 insertExplicitEndTag (string $name, bool $isHTML)
 Dispatch an end tag, and cause the element to be explicitly ended, i.e.
 
 isFosterablePosition ()
 Determine if the TreeBuilder is in a fosterable position, i.e.
 

Public Attributes

 $dispatcher
 
 $treeBuilder
 
 $domBuilder
 
 $doc
 

Constructor & Destructor Documentation

◆ __construct()

Wikimedia\Parsoid\Wt2Html\TreeBuilder\RemexPipeline::__construct ( Env $env)

Create a RemexHtml pipeline.

Since we do our own tokenizing, the Dispatcher is called directly to push data into the pipeline. A RemexHtml Tokenizer is only needed to provide stub handling for certain TreeBuilder callbacks. Those callbacks are required by the HTML 5 spec – we get away with ignoring them because we are not actually parsing HTML.

Parameters
Env$env

Member Function Documentation

◆ insertExplicitEndTag()

Wikimedia\Parsoid\Wt2Html\TreeBuilder\RemexPipeline::insertExplicitEndTag ( string $name,
bool $isHTML )

Dispatch an end tag, and cause the element to be explicitly ended, i.e.

without autoInsertedEnd. Return the element which was ended by the tag, or null if no element was matched.

Parameters
string$name
bool$isHTML
Returns
Element|null

◆ insertExplicitStartTag()

Wikimedia\Parsoid\Wt2Html\TreeBuilder\RemexPipeline::insertExplicitStartTag ( string $name,
array $attribs,
bool $selfClose = false )

Dispatch a start tag and consider the generated element to be explicit, not auto-inserted.

Return that element. If no element was created, return null.

Parameters
string$name
array$attribs
bool$selfClose
Returns
Element|null

◆ insertImplicitStartTag()

Wikimedia\Parsoid\Wt2Html\TreeBuilder\RemexPipeline::insertImplicitStartTag ( string $name,
array $attribs,
bool $selfClose = false )

Dispatch a start tag and consider the generated element to be auto-inserted.

Parameters
string$name
array$attribs
bool$selfClose

◆ insertUnfosteredMeta()

Wikimedia\Parsoid\Wt2Html\TreeBuilder\RemexPipeline::insertUnfosteredMeta ( array $attribs)

Dispatch a meta tag in such a way that it won't be fostered even if the currently open element is a table.

This replaces the old comment hack.

Parameters
array$attribs

◆ isFosterablePosition()

Wikimedia\Parsoid\Wt2Html\TreeBuilder\RemexPipeline::isFosterablePosition ( )

Determine if the TreeBuilder is in a fosterable position, i.e.

insertion of a text node will cause fostering of that text.

Returns
bool

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