marked-mfm/README.md
2022-07-13 21:03:53 +03:00

978 B

marked-mfm

a Marked.js custom extension for Misskey-flavored Markdown.

this is a reimplementation of the original MFM parser, which was written from the ground up using PEG.js instead of as an extension of CommonMark, and therefore was not up to spec. this extension is mostly compatible with the original, except it only implements $[tags]. mentions, hashtags and the search markup are out of scope.

usage

const marked = require('marked')
const markedMfm = require('marked-mfm')

marked.use(markedMfm)
marked.parse('$[x2 beeg text]')
// <p><span class="mfm _mfm_x2_" >beeg text</span></p>

contributing

development discussion takes place on #mfm. contribute by sending pull requests, or patches to my public inbox.