/
index.js
64 lines (62 loc) · 1.51 KB
/
index.js
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
import {blockquote} from './blockquote.js'
import {hardBreak} from './break.js'
import {code} from './code.js'
import {strikethrough} from './delete.js'
import {emphasis} from './emphasis.js'
import {footnoteReference} from './footnote-reference.js'
import {heading} from './heading.js'
import {html} from './html.js'
import {imageReference} from './image-reference.js'
import {image} from './image.js'
import {inlineCode} from './inline-code.js'
import {linkReference} from './link-reference.js'
import {link} from './link.js'
import {listItem} from './list-item.js'
import {list} from './list.js'
import {paragraph} from './paragraph.js'
import {root} from './root.js'
import {strong} from './strong.js'
import {table} from './table.js'
import {tableRow} from './table-row.js'
import {tableCell} from './table-cell.js'
import {text} from './text.js'
import {thematicBreak} from './thematic-break.js'
/**
* Default handlers for nodes.
*
* @satisfies {import('../state.js').Handlers}
*/
export const handlers = {
blockquote,
break: hardBreak,
code,
delete: strikethrough,
emphasis,
footnoteReference,
heading,
html,
imageReference,
image,
inlineCode,
linkReference,
link,
listItem,
list,
paragraph,
// @ts-expect-error: root is different, but hard to type.
root,
strong,
table,
tableCell,
tableRow,
text,
thematicBreak,
toml: ignore,
yaml: ignore,
definition: ignore,
footnoteDefinition: ignore
}
// Return nothing for nodes that are ignored.
function ignore() {
return undefined
}