rehype plugin to wrap blockquotes in figures
npm install rehype-blockquote-figuresA simple rehype plugin that wraps tags in and moves
the immediately-following list item into a .
This lets you use a as the citation for a , as
recommended by Heydon
Pickering.
This plugin is optimal for HTML s rendered from Markdown (e.g. by remark).
``markdown
> Space is big. You just won't believe how vastly, hugely, mind-bogglingly big it is. I mean, you may think it's a long way down the road to the chemist's, but that's just peanuts to space.
- Douglas Adams, The Hitchhiker's Guide to the Galaxy
`
` Space is big. You just won't believe how vastly, hugely, mind-bogglingly big it is. I mean, you may think it's a long way down the road to the chemist's, but that's just peanuts to space.html`
`js
import { unified } from 'unified';
import remarkParse from 'remark-parse';
import remarkRehype from 'remark-rehype';
import rehypeStringify from 'rehype-stringify';
import rehypeBlockquoteFigures from 'rehype-blockquote-figures';
const result = await unified()
.use(remarkParse)
.use(remarkRehype)
.use(rehypeBlockquoteFigures)
.use(rehypeStringify)
.process(markdown);
``