Skip to content
Draft
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@
* Configuration specifically for {@linkcode MarkdownHooks}.
* @property {ReactNode | null | undefined} [fallback]
* Content to render while the processor processing the markdown (optional).
* @property {function(Root | undefined, Error | undefined): void | null | undefined} [onComplete]
* Callback when the processor is done processing.
*/

/**
Expand Down Expand Up @@ -232,6 +234,7 @@ export function MarkdownHooks(options) {
if (!cancelled) {
setError(error)
setTree(tree)
options.onComplete?.(tree, error)
}
})

Expand Down
Loading