@mermaid-lint/core
    Preparing search index...

    Function lintMarkdown

    • Extract every Mermaid block from a Markdown (or .mmd) document and return all diagnostics with absolute coordinates. Lines are clamped to the document so a structural error at EOF can't point past the last line. This is the main entry point for Markdown tool integrations.

      File-scope (<!-- -->) directive diagnostics apply to the whole document, not to any one block, so they are computed and reported exactly once here — see blockToDiagnostics's doc comment for why it deliberately excludes them. That covers both a broken file directive and one that suppressed nothing anywhere in the document; the latter is only answerable here, since it takes every block's suppression index to know that no block used it.

      Parameters

      • path: string

        Source path (a .mmd extension switches to whole-file mode).

      • text: string

        Document contents.

      • options: ExtractOptions = {}

        Fence markers to recognize (see ExtractOptions).

      • rules: ResolvedRules = RULE_DEFAULTS

        Resolved per-rule severities for the semantic pass. Defaults to RULE_DEFAULTS.

      Returns Promise<Diagnostic[]>

      Every diagnostic across all blocks, with absolute coordinates.