showdown-toc
Version:
A showdown extension to output toc info.
17 lines (16 loc) • 343 B
TypeScript
declare type TocItem = {
anchor: string;
level: number;
text: string;
};
declare type TocOpts = {
listType: 'ol' | 'ul';
};
declare function showdownToc({ toc, opts }?: {
toc?: TocItem[];
opts?: TocOpts;
}): () => {
type: string;
filter(source: string): string;
}[];
export default showdownToc;