UNPKG

@capgo/cli

Version:
13 lines (12 loc) 591 B
export interface MarkdownRenderState { inCodeBlock: boolean; } export declare function createMarkdownRenderState(): MarkdownRenderState; /** * Render a single markdown line, threading `state` across calls. Returns the * rendered line, or `null` for hidden ``` fence lines. Both `renderMarkdown` * and the streaming renderer go through this, which is what guarantees their * outputs are byte-identical. */ export declare function renderMarkdownLine(raw: string, state: MarkdownRenderState): string | null; export declare function renderMarkdown(md: string, isTTY?: boolean): string;