Package Exports
- @saeris/remark-del
- @saeris/remark-del/package.json
Readme
➖ remark-del

A unified / remark plugin which adds syntax support for the HTML <del> element in markdown.
📦 Installation
[!Note]
This library is distributed only as an ESM module.
npm install @saeris/remark-delor
yarn add @saeris/remark-del🔧 Usage
Using this library will depend on your particular application or framework. Below is a bare-bones example to test it in Node.
Node:
import remark from "remark";
import remarkParse from "remark-parse";
import remarkDel from "@saeris/remark-del";
import remarkRehype from "remark-rehype";
import rehypeStringify from "rehype-stringify";
const markdown = `--deleted text--`
const result = await remark()
.use(remarkParse)
.use(remarkDel)
.use(remarkRehype)
.use(rehypeStringify)
.process(markdown);
console.log(result.tostring());
// "<p><del class="remark-del">deleted text</del></p>"[!CAUTION]
Whitespace and newlines on either side of the wrapped text is not supported!
The following will not work:
-- unsupported whitespace before-- --unsupported whitespace after -- -- unsupported newline before-- --unsupported newline after --
📣 Acknowledgements
This plugin is based on remark-ins
🥂 License
Released under the MIT © Drake Costa