1 | import { Language } from '../..';
|
2 | import { DocsSchema } from '../schema';
|
3 |
|
4 |
|
5 |
|
6 | export interface MarkdownHeaderOptions {
|
7 | |
8 |
|
9 |
|
10 | readonly title?: string;
|
11 | |
12 |
|
13 |
|
14 |
|
15 |
|
16 | readonly sup?: string;
|
17 | |
18 |
|
19 |
|
20 |
|
21 |
|
22 | readonly pre?: boolean;
|
23 | |
24 |
|
25 |
|
26 |
|
27 |
|
28 | readonly strike?: boolean;
|
29 | }
|
30 |
|
31 |
|
32 |
|
33 | export interface MarkdownOptions {
|
34 | |
35 |
|
36 |
|
37 |
|
38 |
|
39 | readonly header?: MarkdownHeaderOptions;
|
40 | |
41 |
|
42 |
|
43 |
|
44 |
|
45 | readonly id?: string;
|
46 | }
|
47 |
|
48 |
|
49 |
|
50 | export declare class MarkdownDocument {
|
51 | private readonly options;
|
52 | |
53 |
|
54 |
|
55 | static readonly EMPTY: MarkdownDocument;
|
56 | |
57 |
|
58 |
|
59 | static sanitize(line: string): string;
|
60 | |
61 |
|
62 |
|
63 | static removeNewlines(line: string): string;
|
64 | static bold(text: string): string;
|
65 | static pre(text: string): string;
|
66 | static italic(text: string): string;
|
67 | private readonly _lines;
|
68 | private readonly _sections;
|
69 | private readonly id?;
|
70 | private readonly header?;
|
71 | constructor(options?: MarkdownOptions);
|
72 | /**
|
73 | * Render a docs element into the markdown.
|
74 | */
|
75 | docs(docs: DocsSchema, language?: Language): void;
|
76 | table(data: string[][]): void;
|
77 | quote(line: string): void;
|
78 | bullet(line: string): void;
|
79 | code(language: string, ...snippet: string[]): void;
|
80 | lines(...lines: string[]): void;
|
81 | split(): void;
|
82 | section(section: MarkdownDocument): void;
|
83 | render(headerSize?: number): string;
|
84 | private formatHeader;
|
85 | private escapePipes;
|
86 | }
|