File tree 2 files changed +12
-6
lines changed 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change 9
9
* @typedef {import('mdast-util-mdx-jsx').MdxJsxExpressionAttribute } MdxJsxExpressionAttribute
10
10
* @typedef {import('mdast-util-mdx-jsx').MdxJsxFlowElement } MdxJsxFlowElement
11
11
* @typedef {import('mdast-util-mdx-jsx').MdxJsxTextElement } MdxJsxTextElement
12
+ *
13
+ * @typedef {import('mdast-util-mdx-jsx').ToMarkdownOptions } ToMarkdownOptions
12
14
*/
13
15
14
16
import {
@@ -19,19 +21,21 @@ import {mdxJsxFromMarkdown, mdxJsxToMarkdown} from 'mdast-util-mdx-jsx'
19
21
import { mdxjsEsmFromMarkdown , mdxjsEsmToMarkdown } from 'mdast-util-mdxjs-esm'
20
22
21
23
/**
22
- *
23
24
* @return {Array<FromMarkdownExtension> }
24
25
*/
25
26
export function mdxFromMarkdown ( ) {
26
27
return [ mdxExpressionFromMarkdown , mdxJsxFromMarkdown ( ) , mdxjsEsmFromMarkdown ]
27
28
}
28
29
29
- /** @return {ToMarkdownExtension } */
30
- export function mdxToMarkdown ( ) {
30
+ /**
31
+ * @param {ToMarkdownOptions } [options]
32
+ * @return {ToMarkdownExtension }
33
+ */
34
+ export function mdxToMarkdown ( options ) {
31
35
return {
32
36
extensions : [
33
37
mdxExpressionToMarkdown ,
34
- mdxJsxToMarkdown ( ) ,
38
+ mdxJsxToMarkdown ( options ) ,
35
39
mdxjsEsmToMarkdown
36
40
]
37
41
}
Original file line number Diff line number Diff line change @@ -228,14 +228,14 @@ There is no default export.
228
228
229
229
### ` mdxFromMarkdown() `
230
230
231
- ### ` mdxToMarkdown() `
231
+ ### ` mdxToMarkdown(options? ) `
232
232
233
233
Support MDX (or MDX.js).
234
234
The exports are functions that can be called to respectively get an extension
235
235
for [ ` mdast-util-from-markdown ` ] [ from-markdown ] and
236
236
[ ` mdast-util-to-markdown ` ] [ to-markdown ] .
237
237
238
- There are no options.
238
+ The options to ` mdxToMarkdown ` are [ passed to ` mdxJsxToMarkdown ` ] [ options ] .
239
239
240
240
## Related
241
241
@@ -323,3 +323,5 @@ abide by its terms.
323
323
[ mdxjs ] : https://github.com/micromark/micromark-extension-mdxjs
324
324
325
325
[ remark-mdx ] : https://github.com/mdx-js/mdx/tree/next/packages/remark-mdx
326
+
327
+ [ options ] : https://github.com/syntax-tree/mdast-util-mdx-jsx#mdxjsxtomarkdownoptions
You can’t perform that action at this time.
0 commit comments