Skip to content

Commit

Permalink
Add exports of defaultFootnoteBackContent, defaultFootnoteBackLabel
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Sep 19, 2023
1 parent ba50965 commit b990986
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 4 deletions.
6 changes: 5 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,9 @@
* @typedef {import('./lib/index.js').Options} Options
*/

export {defaultHandlers} from 'mdast-util-to-hast'
export {
defaultFootnoteBackContent,
defaultFootnoteBackLabel,
defaultHandlers
} from 'mdast-util-to-hast'
export {default} from './lib/index.js'
27 changes: 24 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`defaultFootnoteBackContent(referenceIndex, rereferenceIndex)`](#defaultfootnotebackcontentreferenceindex-rereferenceindex)
* [`defaultFootnoteBackLabel(referenceIndex, rereferenceIndex)`](#defaultfootnotebacklabelreferenceindex-rereferenceindex)
* [`defaultHandlers`](#defaulthandlers)
* [`unified().use(remarkRehype[, destination][, options])`](#unifieduseremarkrehype-destination-options)
* [`Options`](#options)
Expand Down Expand Up @@ -168,13 +170,26 @@ example.md: no issues found

## API

This package exports the identifier [`defaultHandlers`][api-default-handlers].
This package exports the identifiers
[`defaultFootnoteBackContent`][api-default-footnote-back-content],
[`defaultFootnoteBackLabel`][api-default-footnote-back-label], and
[`defaultHandlers`][api-default-handlers].
The default export is [`remarkRehype`][api-remark-rehype].

### `defaultFootnoteBackContent(referenceIndex, rereferenceIndex)`

See [`defaultFootnoteBackContent` from
`mdast-util-to-hast`][mdast-util-to-hast-default-footnote-back-content]

### `defaultFootnoteBackLabel(referenceIndex, rereferenceIndex)`

See [`defaultFootnoteBackLabel` from
`mdast-util-to-hast`][mdast-util-to-hast-default-footnote-back-label]

### `defaultHandlers`

Default handlers for nodes ([`Handlers` from
`mdast-util-to-hast`][mdast-util-to-hast-handlers]).
See [`defaultHandlers` from
`mdast-util-to-hast`][mdast-util-to-hast-default-handlers]

### `unified().use(remarkRehype[, destination][, options])`

Expand Down Expand Up @@ -693,6 +708,8 @@ abide by its terms.
[mdast-util-to-hast-footnote-back-label-template]: https://github.com/syntax-tree/mdast-util-to-hast#footnotebacklabeltemplate
[mdast-util-to-hast-default-handlers]: https://github.com/syntax-tree/mdast-util-to-hast#defaulthandlers
[mdast-util-to-hast-handlers]: https://github.com/syntax-tree/mdast-util-to-hast#handlers
[mdast-util-to-hast-handler]: https://github.com/syntax-tree/mdast-util-to-hast#handler
Expand Down Expand Up @@ -733,6 +750,10 @@ abide by its terms.
[wiki-xss]: https://en.wikipedia.org/wiki/Cross-site_scripting
[api-default-footnote-back-content]: #defaultfootnotebackcontentreferenceindex-rereferenceindex
[api-default-footnote-back-label]: #defaultfootnotebacklabelreferenceindex-rereferenceindex
[api-default-handlers]: #defaulthandlers
[api-options]: #options
Expand Down
2 changes: 2 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ test('remarkRehype', async function (t) {
await t.test('should expose the public api', async function () {
assert.deepEqual(Object.keys(await import('./index.js')).sort(), [
'default',
'defaultFootnoteBackContent',
'defaultFootnoteBackLabel',
'defaultHandlers'
])
})
Expand Down

0 comments on commit b990986

Please sign in to comment.