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

    Function detectDiagramType

    • Detect a Mermaid diagram's type from its source by reading the first non-blank, non-comment line's leading keyword (e.g. flowchart, sequenceDiagram). Returns 'unknown' for empty or unrecognizable input.

      Parameters

      • body: string

        Raw diagram source.

      Returns string

      The diagram-type keyword, or 'unknown'.