v3.0.0
v2.x to v3.x
.
rehype()
- .use(rehypeRewrite, (node, index, parent) => {})
+ .use(rehypeRewrite, {
+ rewrite: (node, index, parent) => {}
+ })
- 📖 doc: Update README.md ae57cab @jaywcjlove
- 💄 chore: Add homepage feild in package.json 8d50fc0 @jaywcjlove
- 🌟 feat: Redefine options. f3a5033 @jaywcjlove
- 📖 doc: Update README.md 1a120c5 @jaywcjlove
Options
import { Root, Element, ElementContent } from 'hast';
export declare type RehypeRewriteOptions = {
selector?: string;
rewrite(node: ElementContent, index: number | null, parent: Root | Element | null): void;
};
selector?: string;
Select an element to be wrapped. Expects a string selector that can be passed to hast-util-select (supported selectors). If selector
is not set then wrap will check for a body all elements.
rewrite(node, index, parent): void;
Rewrite element.