Skip to content

Commit 0699501

Browse files
authored
Add defaultHandlers export for reusing
Closes GH-67. Closes GH-68. Closes GH-69. Reviewed-by: Christian Murphy <christian.murphy.42@gmail.com> Reviewed-by: Titus Wormer <tituswormer@gmail.com>
1 parent a02be0e commit 0699501

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
* @typedef {import('./lib/types.js').Handle} Handle
66
*/
77

8-
export {one, all, toMdast} from './lib/index.js'
8+
export {one, all, defaultHandlers, toMdast} from './lib/index.js'

lib/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import {own} from './util/own.js'
2121

2222
export {one} from './one.js'
2323
export {all} from './all.js'
24+
export {handlers as defaultHandlers}
2425

2526
const block = convert(['heading', 'paragraph', 'root'])
2627

test/index.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import rehypeStringify from 'rehype-parse'
1818
import remarkStringify from 'remark-stringify'
1919
import {assert} from 'mdast-util-assert'
2020
import {removePosition} from 'unist-util-remove-position'
21-
import {one, all, toMdast} from '../index.js'
21+
import {one, all, defaultHandlers, toMdast} from '../index.js'
2222

2323
const fixtures = path.join('test', 'fixtures')
2424

@@ -27,6 +27,8 @@ test('exports', (t) => {
2727

2828
t.assert(all, 'should export `all`')
2929

30+
t.assert(defaultHandlers, 'should export `defaultHandlers`')
31+
3032
t.end()
3133
})
3234

0 commit comments

Comments
 (0)