This plugin parses ==custom Markdown syntax==
to the HTML <mark>
element.
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>
.
Click ==File > Open== to open the file.
Mark
(Parent
) represents a reference to a user.
interface Mark <: Parent {
type: "mark";
}
For example, the following markdown:
==File > Open==
Yields:
{
type: 'mark',
children: [{
type: 'text',
value: 'File > Open'
}]
}
This plugin is compatible with rehype. Mark
mdast nodes will become <mark>contents</mark>
.
npm:
npm install remark-mark-plus
Dependencies:
const unified = require('unified')
const remarkParse = require('remark-parse')
const stringify = require('rehype-stringify')
const remark2rehype = require('remark-rehype')
const remarkMark = require('remark-mark-plus')
Usage:
unified()
.use(remarkParse)
.use(remarkMark)
.use(remark2rehype)
.use(stringify)
MIT © [Zeste de Savoir][zds]