marked-mfm/README.md

16 lines
618 B
Markdown
Raw Normal View History

2022-07-08 08:41:18 +00:00
# marked-mfm
a [Marked.js](https://marked.js.org) custom extension for [Misskey-flavored Markdown](https://github.com/misskey-dev/mfm.js/blob/develop/docs/syntax.md).
this is a reimplementation of [the original MFM parser](https://github.com/misskey-dev/mfm.js/blob/develop/docs/syntax.md), which was written from the ground up using PEG.js instead of as an extension of CommonMark, and therefore was not up to spec.
## usage
```js
const marked = require('marked')
const markedMfm = require('marked-mfm')
marked.use(markedMfm)
marked.parse('$[x2 beeg text]')
// <p><span class="_mfm_x2_" >beeg text</span></p>
2022-07-08 08:41:18 +00:00
```