opencode/packages/merman/src/flowchart/render.ts
2026-08-07 20:59:50 -04:00

10 lines
434 B
TypeScript

import { drawFlowchartDiagramGrid } from "./drawing.js"
import type { FlowchartDiagramRenderOptions } from "./options.js"
import { parseMermaidFlowchartDiagram } from "./parser.js"
export function renderFlowchartDiagram(content: string, options: FlowchartDiagramRenderOptions = {}): string {
return drawFlowchartDiagramGrid(parseMermaidFlowchartDiagram(content), options).toString({
trimTop: true,
trimBottom: true,
})
}