0.4.1 • Published 4 months ago
rehype-jsx v0.4.1
rehype-jsx
Rehype Plugin to JSX
Install
npm install rehype-jsx
Usage
import rehype from 'rehype'
import rehypeJsx from 'rehype-jsx'
rehype()
.data('settings', { fragment: true })
.use(rehypeJsx)
.process('<div>Hello World</div>')
.then(({ value }) => {
console.log(value) // <><div>{"Hello World"}</div></>;
})
License
MIT