remark-inserted
This plugin parses custom Markdown syntax to handle text insertions like ++cats are awesome++
. It adds a new node type to the mdast produced by remark: Mark
If you are using rehype, the stringified HTML result will be <mark>
.
Syntax
It's cool how ++cats++ are super awesome.
mdast specification)
AST (seeMark
(Parent
) represents a reference to a user.
interface Mark <: Parent type: "Mark";
For example, the following markdown:
++cats++
Yields:
type: 'mark' children: type: 'text' value: 'cats'
Rehype
This plugin is compatible with rehype. Mark
mdast nodes will become <mark>contents</mark>
.
Installation
npm:
npm install remark-inserted
Usage
Dependencies:
const unified = ;const remarkParse = ;const stringify = ;const remark2rehype = ; const remarkInserted = ;
Usage:
;
License
MIT © John McDowall