Releases: jaywcjlove/rehype-rewrite
v4.0.2
Documentation v4.0.2: https://raw.githack.com/jaywcjlove/rehype-rewrite/859bdba/index.html
Comparing Changes: v4.0.2...v4.0.2
v4.0.1
Documentation v4.0.1: https://raw.githack.com/jaywcjlove/rehype-rewrite/da871de/index.html
Comparing Changes: v4.0.0...v4.0.1
- π chore: add sponsor badge. 78ddce0 @jaywcjlove
v4.0.0
Documentation v4.0.0: https://raw.githack.com/jaywcjlove/rehype-rewrite/490303d/index.html
Comparing Changes: v3.0.6...v4.0.0
- π fix(deps): update dependency unified to v11 (#30) 29c67de @renovate-bot
- π fix(deps): update dependency hast-util-select to v6 (#29) e8c48fd @renovate-bot
- π fix(deps): update dependency unist-util-visit to v5 (#28) a073df3 @renovate-bot
- π chore(deps): update dependency rehype to v13 (#31) d73156e @renovate-bot
- π chore(deps): update dependency remark-rehype to v11 (#35) 95ce8e7 @renovate-bot
- π chore(deps): update dependency remark-parse to v11 (#34) bd04469 @renovate-bot
- π chore(deps): update dependency rehype-stringify to v10 (#32) adeaea4 @renovate-bot
- π chore(deps): update dependency rehype-raw to v7 (#33) 72aebdd @renovate-bot
- β test: fix jest config. b21e667 @jaywcjlove
- π’ ci: update workflows config. 5e23469 @jaywcjlove
- π type: fix rewrite option type error. a3887cd @jaywcjlove
v3.0.6
Documentation v3.0.6: https://raw.githack.com/jaywcjlove/rehype-rewrite/e138d83/index.html
Comparing Changes: v3.0.5...v3.0.6
- π feat: add getCodeString api. fbef181 @jaywcjlove
v3.0.5
Documentation v3.0.5: https://raw.githack.com/jaywcjlove/rehype-rewrite/d0a8b84/index.html
Comparing Changes: v3.0.4...v3.0.5
- π doc: Update README.md 44d5756 @jaywcjlove
- π doc: Update README.md 81f3a3a @jaywcjlove
- π doc: Update README.md c2a2b2d @jaywcjlove
- π doc: Update README.md 561182b @jaywcjlove
- π chore: update workflows config. af28af4 @jaywcjlove
- π chore: update renovate.json 9196d79 @jaywcjlove
- π chore(deps): update dependencies. 95e182e @jaywcjlove
v3.0.4
v3.0.3
- π doc: Update README.md 877e23c @jaywcjlove
- π chore(deps): update dependency remark-rehype to v10 (#19) 6cffe62 @renovate-bot
- π chore(deps): update dependency tsbb to v3.4.1 (#18) dab5ee3 @renovate-bot
- π chore(deps): update dependency tsc-esm-fix to v2.7.3 (#17) 22df091 @renovate-bot
- π fix: Replace main with exports in package.json 2866d64 @jaywcjlove
v3.0.2
- π doc: Update README.md 02669ee @jaywcjlove
- π type: Update type document. bd5b2d7 @jaywcjlove
Options
import { Plugin } from 'unified';
import { Root, Element, RootContent } from 'hast';
export declare type RehypeRewriteOptions = {
/**
* Select an element to be wrapped. Expects a string selector that can be passed to hast-util-select ([supported selectors](https://github.com/syntax-tree/hast-util-select/blob/master/readme.md#support)).
* If `selector` is not set then wrap will check for a body all elements.
*/
selector?: string;
/** Rewrite Element. */
rewrite(node: Root | RootContent, index: number | null, parent: Root | Element | null): void;
};
declare const remarkRewrite: Plugin<[RehypeRewriteOptions?], Root>;
export default remarkRewrite;
v3.0.1
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.