ts-markdown
Version:
An extensible TypeScript markdown generator that takes JSON and creates a markdown document.
36 lines (35 loc) • 1.06 kB
TypeScript
import { MarkdownRenderer } from '../rendering.types';
import { MarkdownEntry } from '../shared.types';
/**
* A markdown entry for generating hr elements.
*/
export interface HorizontalRuleEntry extends MarkdownEntry {
/**
* The hr contents and identifying property for the renderer.
*/
hr: any;
/**
* Option determining which indicator to use for an hr.
* Default: '-'
*/
indicator?: '*' | '-' | '_';
/**
* Option which will arbitrarily append a string immediately below the hr, ignoring block-level settings.
*/
append?: string;
}
/**
* The renderer for hr entries.
*
* @param entry The hr entry.
* @param options Document-level render options.
* @returns Block-level hr markdown content.
*/
export declare const hrRenderer: MarkdownRenderer;
/**
* Helper which creates a horizontal rule entry.
*
* @param options Entry-level options for this element.
* @returns a horizontal rule entry
*/
export declare function hr(options?: Omit<HorizontalRuleEntry, 'hr'>): HorizontalRuleEntry;