|
5 | 5 | */ |
6 | 6 | import { stringifyEntitiesLight } from 'stringify-entities' |
7 | 7 | import type { Parent } from 'mdast-util-to-markdown/lib/types' |
| 8 | +import { handle } from 'mdast-util-to-markdown/lib/handle' |
| 9 | +import { Context, SafeOptions } from 'mdast-util-to-markdown' |
8 | 10 | import { containerFlow, containerPhrasing, checkQuote } from './mdast-util-to-markdown' |
9 | 11 | import { stringifyFrontMatter } from './frontmatter' |
10 | 12 |
|
@@ -34,7 +36,22 @@ export default { |
34 | 36 | handlers: { |
35 | 37 | containerComponent, |
36 | 38 | textComponent, |
37 | | - componentContainerSection |
| 39 | + componentContainerSection, |
| 40 | + image: (node: Parent, _: any, context: Context, safeOptions: SafeOptions) => { |
| 41 | + return handle.image(node as any, _, context, safeOptions) + attributes(node, context) |
| 42 | + }, |
| 43 | + link: (node: Parent, _: any, context: Context, safeOptions: SafeOptions) => { |
| 44 | + return handle.link(node as any, _, context, safeOptions) + attributes(node, context) |
| 45 | + }, |
| 46 | + strong: (node: Parent, _: any, context: Context, safeOptions: SafeOptions) => { |
| 47 | + return handle.strong(node as any, _, context, safeOptions) + attributes(node, context) |
| 48 | + }, |
| 49 | + inlineCode: (node: Parent, _: any, context: Context) => { |
| 50 | + return handle.inlineCode(node as any, _, context) + attributes(node, context) |
| 51 | + }, |
| 52 | + emphasis: (node: Parent, _: any, context: Context, safeOptions: SafeOptions) => { |
| 53 | + return handle.emphasis(node as any, _, context, safeOptions) + attributes(node, context) |
| 54 | + } |
38 | 55 | } |
39 | 56 | } |
40 | 57 |
|
|
0 commit comments