File tree 3 files changed +6
-7
lines changed
3 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 69
69
],
70
70
"sideEffects" : false ,
71
71
"type" : " module" ,
72
- "main" : " index.js" ,
73
- "types" : " index.d.ts" ,
72
+ "exports" : " ./index.js" ,
74
73
"files" : [
75
74
" lib/" ,
76
75
" index.d.ts" ,
Original file line number Diff line number Diff line change @@ -685,9 +685,9 @@ It lets you define your own schema of what is and isn’t allowed.
685
685
686
686
## Related
687
687
688
- * [` MDX ` ](https: // github.com/ mdx-js/mdx)
688
+ * [` MDX ` ][ mdx]
689
689
— JSX *in* markdown
690
- * [` remark-gfm ` ]( https : // github.com/remarkjs/ remark-gfm)
690
+ * [` remark-gfm ` ][ remark-gfm]
691
691
— add support for GitHub flavored markdown support
692
692
* [` react-remark ` ][react-remark]
693
693
— modern hook based alternative
Original file line number Diff line number Diff line change 1
1
/* @jsxRuntime automatic @jsxImportSource react */
2
2
/**
3
3
* @typedef {import('hast').Root } Root
4
- * @typedef {import('./index.js ').ExtraProps } ExtraProps
4
+ * @typedef {import('react-markdown ').ExtraProps } ExtraProps
5
5
*/
6
6
7
7
import assert from 'node:assert/strict'
8
8
import test from 'node:test'
9
9
import { renderToStaticMarkup } from 'react-dom/server'
10
+ import Markdown from 'react-markdown'
10
11
import rehypeRaw from 'rehype-raw'
11
12
import remarkGfm from 'remark-gfm'
12
13
import remarkToc from 'remark-toc'
13
14
import { visit } from 'unist-util-visit'
14
- import Markdown from './index.js'
15
15
16
16
test ( 'react-markdown' , async function ( t ) {
17
17
await t . test ( 'should expose the public api' , async function ( ) {
18
- assert . deepEqual ( Object . keys ( await import ( './index.js ' ) ) . sort ( ) , [
18
+ assert . deepEqual ( Object . keys ( await import ( 'react-markdown ' ) ) . sort ( ) , [
19
19
'default' ,
20
20
'defaultUrlTransform'
21
21
] )
You can’t perform that action at this time.
0 commit comments