@mermaid-editor-sdk/headless


@mermaid-editor-sdk/headless / appendSourceLines

Function: appendSourceLines()

appendSourceLines(source, additions, diagramType): string

Defined in: source/source-document.ts:37

Appends diagram statements before trailing comments and whitespace.

Parameters

ParameterTypeDescription
sourcestringMermaid source to update.
additionsreadonly string[]Statements to append.
diagramTypeDiagramTypeDiagram type used to find the insertion point.

Returns

string