@mirrordown/remd-ins
v0.1.3
Published
A remark plugin for insertion syntax (++text++), rendering <ins> elements.
Readme
@mirrordown/remd-ins
Part of Mirrordown — a suite of markdown syntax extensions for the unified and markdown-it ecosystems.
A remark/rehype (unified) plugin for the ins syntax extension.
Overview
The ins plugin renders ++text++ as an HTML <ins> element, representing inserted or added text.
<ins>text</ins>Syntax
Wrap text in double plus signs to mark it as inserted:
++This text has been inserted.++
You can use it inline: the price is now ++$35++ (was $50).Install
npm install @mirrordown/remd-insUnified
import { unified } from "unified";
import remarkParse from "remark-parse";
import remarkRehype from "remark-rehype";
import rehypeStringify from "rehype-stringify";
import { remarkIns } from "@mirrordown/remd-ins";
const processor = unified()
.use(remarkParse)
.use(remarkIns)
.use(remarkRehype)
.use(rehypeStringify);Astro
// astro.config.ts
import { defineConfig } from "astro/config";
import { remarkIns } from "@mirrordown/remd-ins";
export default defineConfig({
markdown: {
remarkPlugins: [remarkIns]
}
});VitePress
// .vitepress/config.ts
import { defineConfig } from "vitepress";
import { remarkIns } from "@mirrordown/remd-ins";
export default defineConfig({
markdown: {
remarkPlugins: [remarkIns]
}
});Documentation
Full documentation, more examples, and configuration options: github.com/mirrordown/mirrordown (dedicated docs site coming soon).
License
MIT © Drake Costa
