UNPKG

ts-markdown

Version:

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

32 lines (31 loc) 974 B
import { MarkdownRenderer } from '../rendering.types'; import { RichTextEntry, MarkdownEntry } from '../shared.types'; /** * A markdown entry for generating subscript text. */ export interface SubscriptEntry extends MarkdownEntry, RichTextEntry { /** * The subscript contents and identifying property for the renderer. */ sub: RichTextEntry; /** * Option to render the subscript indicators as HTML. * Default: false */ html?: boolean; } /** * The renderer for subscript entries. * * @param entry The subscript entry. * @param options Document-level render options. * @returns Subscript markdown content. */ export declare const subRenderer: MarkdownRenderer; /** * Helper which creates a subscript text entry. * * @param options Entry-level options for this element. * @returns a subscript text entry */ export declare function sub(content: SubscriptEntry['sub'], options?: Omit<SubscriptEntry, 'sub'>): SubscriptEntry;