Source path (a .mmd extension switches to whole-file mode).
Document contents.
Fence markers to recognize (see ExtractOptions).
Resolved per-rule severities for the semantic pass. Defaults to RULE_DEFAULTS.
Every diagnostic across all blocks, with absolute coordinates.
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.