Riksdagsmonitor Intelligence Platform โ€” API Documentation - v1.0.30
    Preparing search index...
    • Walk markdown line-by-line and extract every ```mermaid block.

      Recognition rules (matching the renderer + article-validator):

      • Opening fence: /^```mermaid[\t ]*$/
      • Closing fence: /^```[\t ]*$/
      • Any other ``` line (e.g. another language tag) is treated as an implicit close and the current block is reported as unclosed.

      Pure function โ€” never mutates markdown or any global state.

      Parameters

      • markdown: string

      Returns readonly MermaidBlock[]