Add README

This commit is contained in:
Sol Fisher Romanoff 2022-07-08 11:41:18 +03:00
parent 76904e0888
commit e7f6a84919
Signed by: nbsp
GPG Key ID: 9D3F2B64F2341B62
1 changed files with 15 additions and 0 deletions

15
README.md Normal file
View File

@ -0,0 +1,15 @@
# 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 style="display: inline-block" class="x2">beeg text</span></p>
```