Class: ParserPipelineFactory

wt2html/parser~ParserPipelineFactory(env)

new ParserPipelineFactory(env)

...
Parameters:
Name Type Description
env MWParserEnvironment
Source:

Members

recipes

Recipe for parser pipelines and -subpipelines, depending on input types.

Recipe for parser pipelines and -subpipelines, depending on input types.

Token stream transformations to register by type and per phase. The possible ranks for individual transformation registrations are [0,1) (excluding 1.0) for sync01, [1,2) for async12 and [2,3) for sync23.

Should perhaps be moved to MWParserEnvironment, so that all configuration can be found in a single place.

Source:

Methods

getPipeline()

Get a subpipeline (not the top-level one) of a given type.

Get a subpipeline (not the top-level one) of a given type.

Subpipelines are cached as they are frequently created.

Source:

makePipeline()

Generic pipeline creation from the above recipes.

Generic pipeline creation from the above recipes.

Source:

parse(src, cbopt) → {Promise}

...
Parameters:
Name Type Attributes Description
src string
cb function <optional>
Source:
Returns:
Type
Promise

returnPipeline()

Callback called by a pipeline at the end of its processing.

Callback called by a pipeline at the end of its processing. Returns the pipeline to the cache.

Source: