1 | import * as markdownit from 'markdown-it';
|
2 | import { MarkdownString } from '../../common/markdown-rendering/markdown-string';
|
3 | import { Disposable, DisposableGroup } from '../../common';
|
4 | import { LabelParser } from '../label-parser';
|
5 | export interface ContentActionHandler {
|
6 | callback: (content: string, event?: MouseEvent) => void;
|
7 | readonly disposables: DisposableGroup;
|
8 | }
|
9 | export interface FormattedTextRenderOptions {
|
10 | readonly className?: string;
|
11 | readonly inline?: boolean;
|
12 | readonly actionHandler?: ContentActionHandler;
|
13 | readonly renderCodeSegments?: boolean;
|
14 | }
|
15 | export interface MarkdownRenderResult extends Disposable {
|
16 | element: HTMLElement;
|
17 | }
|
18 | export interface MarkdownRenderOptions extends FormattedTextRenderOptions {
|
19 | readonly codeBlockRenderer?: (languageId: string, value: string) => Promise<HTMLElement>;
|
20 | readonly asyncRenderCallback?: () => void;
|
21 | }
|
22 |
|
23 | export declare const MarkdownRenderer: unique symbol;
|
24 | export interface MarkdownRenderer {
|
25 | render(markdown: MarkdownString | undefined, options?: MarkdownRenderOptions): MarkdownRenderResult;
|
26 | }
|
27 |
|
28 | export declare const MarkdownRendererFactory: unique symbol;
|
29 | export interface MarkdownRendererFactory {
|
30 | (): MarkdownRenderer;
|
31 | }
|
32 | export declare class MarkdownRendererImpl implements MarkdownRenderer {
|
33 | protected readonly labelParser: LabelParser;
|
34 | protected readonly markdownIt: markdownit;
|
35 | protected resetRenderer: Disposable | undefined;
|
36 | protected init(): void;
|
37 | render(markdown: MarkdownString | undefined, options?: MarkdownRenderOptions): MarkdownRenderResult;
|
38 | protected markdownItPlugin(): void;
|
39 | }
|
40 |
|
\ | No newline at end of file |