-
Notifications
You must be signed in to change notification settings - Fork 0
/
option.ts
60 lines (54 loc) · 1.59 KB
/
option.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
namespace markedjs {
export class option {
baseUrl: string;
breaks: boolean;
gfm: boolean;
headerIds: boolean;
headerPrefix: string;
highlight: (code: string, lang: string, callback?: highlightCallback) => string;
addcodeTag: boolean;
langPrefix: string;
mangle: boolean;
pedantic: boolean;
renderer: Renderer;
sanitize: boolean;
sanitizer?: (text: string) => string;
silent: boolean;
smartLists: boolean;
smartypants: boolean;
tables: boolean;
xhtml: boolean;
debug: boolean = false;
block: block;
inline: inline;
public static get Defaults(): option {
return <option>{
baseUrl: null,
breaks: false,
gfm: true,
headerIds: true,
headerPrefix: '',
highlight: null,
langPrefix: 'language-',
mangle: true,
pedantic: false,
renderer: null, // new Renderer(),
sanitize: false,
sanitizer: null,
silent: false,
smartLists: false,
smartypants: false,
tables: true,
xhtml: false,
debug: false,
addcodeTag: true,
// grammers
inline: new inline(),
block: new block()
};
}
}
interface highlightCallback {
(err: string, code: number | string): void;
}
}