@wdprlib/parser
    Preparing search index...

    Interface ParseResult

    The result of parsing a Wikidot markup string.

    Contains both the parsed AST and any diagnostics emitted during parsing. The AST is always produced, even when diagnostics are present — the parser is lenient and recovers from errors.

    import { parse } from "@wdprlib/parser";

    const result = parse("**bold** and //italic//");
    console.log(result.ast.elements); // AST nodes
    console.log(result.diagnostics); // [] (no issues)

    2.0.0

    interface ParseResult {
        ast: SyntaxTree;
        diagnostics: Diagnostic[];
    }
    Index

    Properties

    Properties

    The parsed syntax tree.

    diagnostics: Diagnostic[]

    Diagnostics emitted during parsing (empty when the input is clean).