import 'requestidlecallback'; import { Node } from 'unist'; export interface ICodeCell { id: string; type: 'code'; /** * CoffeScript code */ value: string; /** * e.g. "coffescript" */ lang: string; /** * Title of the cell */ meta?: string; } export interface ITextCell { id: string; type: 'text'; /** * Markdown text */ value: string; /** * Array of MDAST node */ nodes: Node[]; } export declare type ICell = ICodeCell | ITextCell; /** * Parse markdown and chunk cells separated by the Thematic break. https://spec.commonmark.org/0.29/#thematic-breaks * If code block is top of the cell, it becomes the Code Cell, only 1 block including. * Others will merge. It become the Text Cell. * @param text Markdown text */ export declare function cellify(text: string): ICell[]; /** * Parse text written in Markdown and return children of root node as an array. * @param text Markdown text */ export declare function blockify(text: string): Node[]; export declare function htmlify(nodes: Node[]): { __html: string; }; export declare function markdownify(nodes: Node[]): string; export declare function md2html(text: string): { __html: string; };