-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
86 lines (72 loc) · 1.97 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
export default class CodeGridMarkdown {
constructor(options?: CodeGridMarkdownOptions);
render(md: string): string;
}
/**
* Basically the same as MarkedOptions.
* Except for `renderer`, `headerIds`, `langPrefix` options.
*
* See also https://github.com/DefinitelyTyped/DefinitelyTyped/blob/551eef84346f7141a6f52da938f484f445b5814a/types/marked/index.d.ts#L433
*/
export interface CodeGridMarkdownOptions {
/**
* A prefix URL for any relative link.
*/
baseUrl?: string;
/**
* Enable GFM line breaks. This option requires the gfm option to be true.
*/
breaks?: boolean;
/**
* Enable GitHub flavored markdown.
*/
gfm?: boolean;
/**
* Set the prefix for header tag ids.
*/
headerPrefix?: string;
/**
* A function to highlight code blocks. The function takes three arguments: code, lang, and callback.
*/
highlight?(
code: string,
lang: string,
callback?: (error: any | undefined, code: string) => void,
): string;
/**
* Mangle autolinks (<[email protected]>).
*/
mangle?: boolean;
/**
* Conform to obscure parts of markdown.pl as much as possible. Don't fix any of the original markdown bugs or poor behavior.
*/
pedantic?: boolean;
/**
* Sanitize the output. Ignore any HTML that has been input.
*/
sanitize?: boolean;
/**
* Optionally sanitize found HTML with a sanitizer function.
*/
sanitizer?(html: string): string;
/**
* Shows an HTML error message when rendering fails.
*/
silent?: boolean;
/**
* Use smarter list behavior than the original markdown. May eventually be default with the old behavior moved into pedantic.
*/
smartLists?: boolean;
/**
* Use "smart" typograhic punctuation for things like quotes and dashes.
*/
smartypants?: boolean;
/**
* Enable GFM tables. This option requires the gfm option to be true.
*/
tables?: boolean;
/**
* Generate closing slash for self-closing tags (<br/> instead of <br>)
*/
xhtml?: boolean;
}