UNPKG

remark-directive-rehype

Version:

Remark plugin to enable Markdown directives to be parsed as HTML.

27 lines 827 B
import type { Plugin } from 'unified'; /** * Remark plugin that enables directives (parsed by `remark-directive`) to be * rendered as HTML elements when using `remark-rehype`. * * @remarks * This plugin must be used after `remark-directive` and before `remark-rehype` * in the unified pipeline. * * @example * ```ts * import remarkDirective from 'remark-directive' * import remarkDirectiveRehype from 'remark-directive-rehype' * import remarkRehype from 'remark-rehype' * * const file = await unified() * .use(remarkParse) * .use(remarkDirective) * .use(remarkDirectiveRehype) * .use(remarkRehype) * .use(rehypeStringify) * .process('::my-component{title="Hello"}') * ``` */ declare const remarkDirectiveRehype: Plugin; export default remarkDirectiveRehype; //# sourceMappingURL=index.d.ts.map