/** * @packageDocumentation * @module markedparser-extension */ import type { JupyterFrontEndPlugin } from '@jupyterlab/application'; import { IEditorLanguageRegistry } from '@jupyterlab/codemirror'; import { IMarkdownParser } from '@jupyterlab/rendermime'; import type { IMarkdownHeadingToken } from '@jupyterlab/rendermime'; /** * An interface for fenced code block renderers. */ export interface IFencedBlockRenderer { languages: string[]; rank: number; walk: (text: string) => Promise; render: (text: string) => string | null; } /** * Options */ export interface IRenderOptions { /** handlers for fenced code blocks */ blocks?: IFencedBlockRenderer[]; } /** * Create a markdown parser * * @param languages Editor languages * @returns Markdown parser */ export declare function createMarkdownParser(languages: IEditorLanguageRegistry, options?: IRenderOptions): { render: (content: string) => Promise; getHeadingTokens: (content: string) => Promise; }; /** * The markdown parser plugin. */ declare const plugin: JupyterFrontEndPlugin; /** * Export the plugin as default. */ export default plugin;