Riksdagsmonitor Intelligence Platform โ€” API Documentation - v1.0.30
    Preparing search index...
    • Detect whether a Mermaid diagram body already declares its own theme.

      Matches the same heuristics used by Check 5 of .github/prompts/05-analysis-gate.md:

      • a %%{init โ€ฆ}%% prologue, or
      • any themeVariables declaration anywhere in the body, or
      • any style โ€ฆ directive (per-node colours), or
      • any classDef โ€ฆ directive (per-class colours), or
      • any linkStyle โ€ฆ directive (per-link colours).

      If any of these are present, the renderer leaves the diagram alone. Otherwise it prepends CANONICAL_MERMAID_INIT.

      Parameters

      • diagramBody: string

      Returns boolean