@wdprlib/parser
    Preparing search index...

    Module parser/rules/block/module/include/resolve

    Text-level expansion of [[include]] directives.

    Unlike most Wikidot constructs that are handled during AST parsing, include directives are resolved as a text-level macro expansion BEFORE the main parse. This is necessary because included content may contain partial block structures (e.g., an opening [[div]] tag in one include and its closing [[/div]] in another) that must be visible to the parser as a single continuous text.

    The resolution process follows Wikidot's iterative (do-while) approach:

    1. Scan the entire source text for [[include page | var=val]] patterns
    2. Replace ALL matches in one pass (each fetched, variable-substituted)
    3. Compare the result with the previous source
    4. Repeat until no changes occur or maxIterations is reached

    This differs from a DFS recursive approach: each iteration expands one "layer" of includes across the whole source, rather than drilling into each include immediately. This allows patterns like inc-loop (where the same page is included with different variables across iterations) to work.

    Interfaces

    ResolveIncludesOptions

    Type Aliases

    AsyncIncludeFetcher
    IncludeFetcher

    Functions

    resolveIncludes
    resolveIncludesAsync