Skip to content

Commit 9d6abd0

Browse files
committed
Add docs for defaultHandlers
1 parent 40c3b28 commit 9d6abd0

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

readme.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ Now, running `node example.js` yields:
5959

6060
## API
6161

62-
This package exports the following identifiers: `toMdast`, `one`, `all`.
62+
This package exports the following identifiers: `toMdast`, `defaultHandlers`,
63+
`one`, `all`.
6364
There is no default export.
6465

6566
### `toMdast(tree[, options])`
@@ -229,6 +230,12 @@ Yields:
229230
Some text with <svg viewBox="0 0 1 1" width="1" height="1"><rect fill="black" x="0" y="0" width="1" height="1"></rect></svg> a graphic… Wait is that a dead pixel?
230231
```
231232

233+
### `defaultHandlers`
234+
235+
Object mapping HTML tag names (and node types) to functions that can handle
236+
them.
237+
See [`lib/handlers/index.js`][default-handlers]
238+
232239
### `all(h, parent)`
233240

234241
Helper function for writing custom handlers passed to `options.handlers`.
@@ -349,3 +356,5 @@ abide by its terms.
349356
[handlers]: https://github.com/syntax-tree/hast-util-to-mdast/tree/main/lib/handlers
350357

351358
[spec]: https://html.spec.whatwg.org/#paragraphs
359+
360+
[default-handlers]: https://github.com/syntax-tree/hast-util-to-mdast/blob/main/lib/handlers/index.js

0 commit comments

Comments
 (0)