UNPKG

@thi.ng/transclude

Version:

Extensible functional template engine for text document generation, incl. various high-level Markdown features

43 lines 1.12 kB
import type { TemplateFn } from "../api.js"; export declare const image: (url: string, alt?: string) => string; export declare const link: (title: string, href: string) => string; export declare const list: (items: string[], eol?: string) => string; export interface TOCOpts { /** * Min headline level * * @defaultValue 2 */ min: number; /** * Max headline level * * @defaultValue 4 */ max: number; /** * */ title: string; /** * Placeholder pattern for injected TOC * * @defaultValue "\<!-- toc --\>" */ match: string | RegExp; /** * Test pattern for disabling TOC. If this pattern is found no TOC will be injected. * * @defaultValue "\<!-- notoc --\>" */ disable: RegExp; } /** * Higher order, configurable post-processing template function. Injects a table * of contents for the first `<!-- toc -->` occurrence. See {@link TOCOpts} for * config options. * * @param opts */ export declare const toc: (opts?: Partial<TOCOpts>) => TemplateFn; //# sourceMappingURL=markdown.d.ts.map