-
-
Notifications
You must be signed in to change notification settings - Fork 75
/
markdown_it.ts
44 lines (36 loc) · 1.44 KB
/
markdown_it.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
export { default as markdownIt } from "https://jspm.dev/markdown-it@12.3.2";
export { default as markdownItAttrs } from "https://jspm.dev/markdown-it-attrs@4.1.3";
export { default as markdownItDeflist } from "https://jspm.dev/markdown-it-deflist@2.1.0";
export interface MarkdownItOptions {
/** Set `true` to enable HTML tags in source */
html?: boolean;
/**
* Use '/' to close single tags (<br />).
* This is only for full CommonMark compatibility.
*/
xhtmlOut?: boolean;
/** Convert '\n' in paragraphs into <br> */
breaks?: boolean;
/**
* CSS language prefix for fenced blocks.
* Can be useful for external highlighters.
*/
langPrefix?: string;
/** Autoconvert URL-like text to links */
linkify?: boolean;
/** Enable some language-neutral replacement + quotes beautification */
typographer?: boolean;
/**
* Double + single quotes replacement pairs, when typographer enabled,
* and smartquotes on. Could be either a String or an Array.
* For example, you can use '«»„“' for Russian, '„“‚‘' for German,
* and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp).
*/
quotes?: string | string[];
/**
* Highlighter function. Should return escaped HTML,
* or '' if the source string is not changed and should be escaped externally.
* If result starts with <pre... internal wrapper is skipped.
*/
highlight?: (str: string, lang: string) => string | null;
}