Class: TemplateHandler

wt2html/tt/TemplateHandler~TemplateHandler()

new TemplateHandler()

...

Extends

Methods

_encapsulateTemplate()

Process the main template element, including the arguments.

Process the main template element, including the arguments.

Source:

_expandTemplate()

Fetch, tokenize and token-transform a template after all arguments and the target were expanded.

Fetch, tokenize and token-transform a template after all arguments and the target were expanded.

Source:

_fetchTemplateAndTitle()

Fetch a template.

Fetch a template.

Source:

_onChunk()

Handle chunk emitted from the input pipeline after feeding it a template.

Handle chunk emitted from the input pipeline after feeding it a template.

Source:

_onEnd()

Handle the end event emitted by the parser pipeline after fully processing the template source.

Handle the end event emitted by the parser pipeline after fully processing the template source.

Source:

_parserFunctionsWrapper()

Parser functions also need template wrapping.

Parser functions also need template wrapping.

Source:

_startTokenPipeline()

Process a fetched template source to a token stream.

Process a fetched template source to a token stream.

Source:

checkRes()

checkRes

.

fetchExpandedTpl()

Fetch the preprocessed wikitext for a template-like construct.

Fetch the preprocessed wikitext for a template-like construct.

Source:

getArgInfo()

Get the public data-mw structure that exposes the template name and parameters.

Get the public data-mw structure that exposes the template name and parameters.

Source:

onTemplate()

Main template token handler.

Main template token handler.

Expands target and arguments (both keys and values) and either directly calls or sets up the callback to _expandTemplate, which then fetches and processes the template.

Source:

onTemplateArg()

Expand template arguments with tokens from the containing frame.

Expand template arguments with tokens from the containing frame.

Source:

processSpecialMagicWord()

Process the special magic word as specified by resolvedTgt.magicWordType.

Process the special magic word as specified by resolvedTgt.magicWordType.

magicWordType === '!'    => {{!}} is the magic word
magicWordtype === 'MASQ' => DEFAULTSORT, DISPLAYTITLE are the magic words
                            (Util.magicMasqs.has(..))
Source: