Interface ParseTemplatesConfig

The parsing config of Wikitext.parseTemplates.

Hierarchy

Properties

_nestLevel?: number

Private parameter used to determine the value of ParsedTemplate.nestLevel.

hierarchy?: string[][]

Argument hierarchies.

Module-invoking templates may have nested parameters; for example, {{#invoke:module|user={{{1|{{{user|}}}}}}}} can be transcluded as {{template|user=value|1=value}}. In this case, |1= and |user= should be regarded as instantiating the same template argument, and any non-empty |user= argument should override the |1= argument if any. To specify this type of argument hierarchies, pass [['1', 'user'], [...]]. Then, |1= will be overridden by |user= any time when an argument registration takes place and the operation detects the presence of a lower-hierarchy argument in the Template instance.

namePredicate?: ((name) => boolean)

Type declaration

    • (name): boolean
    • Only parse templates whose names match this predicate.

      Parameters

      Returns boolean

recursivePredicate?: ((Template) => boolean)

Type declaration

    • (Template): boolean
    • Parse nested templates in accordance with this predicate.

      Default: Always parse nested templates

      Parameters

      Returns boolean

templatePredicate?: ((Template) => boolean)

Type declaration

Generated using TypeDoc