UNPKG

ts-markdown

Version:

An extensible TypeScript markdown generator that takes JSON and creates a markdown document.

31 lines (30 loc) 1.09 kB
import { MarkdownEntryOrPrimitive, MarkdownRenderer } from '../rendering.types'; import { MarkdownEntry } from '../shared.types'; /** * A markdown entry for generating blockquotes. */ export interface BlockquoteEntry extends MarkdownEntry { /** * The blockquote contents and identifying property for the renderer. */ blockquote: MarkdownEntryOrPrimitive | MarkdownEntryOrPrimitive[]; /** * Option which will arbitrarily append a string immediately below the blockquote, ignoring block-level settings. */ append?: string; } /** * The renderer for blockquote entries. * * @param entry The blockquote entry. * @param options Document-level render options. * @returns Block-level blockquote markdown content. */ export declare const blockquoteRenderer: MarkdownRenderer; /** * Helper which creates a blockquote entry. * * @param options Entry-level options for this element. * @returns a blockquote entry */ export declare function blockquote(content: BlockquoteEntry['blockquote'], options?: Omit<BlockquoteEntry, 'blockquote'>): BlockquoteEntry;