Marked.js extension for Misskey-flavored Markdown
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
Go to file
Sol Fisher Romanoff 982958ce2b
ci/woodpecker/push/woodpecker Pipeline was successful Details
Mention dingus in README
10 months ago
docs Add syntax document 11 months ago
lib Add backslash escaping 10 months ago
src Add backslash escaping 10 months ago
test Add backslash escaping 10 months ago
.editorconfig Initial commit 11 months ago
.eslintignore Add bundler 11 months ago
.eslintrc.cjs Initial commit 11 months ago
.gitignore Initial commit 11 months ago
.woodpecker.yml Add bundler 11 months ago
LICENSE Initial commit 11 months ago
README.md Mention dingus in README 10 months ago
babel.config.json Initial commit 11 months ago
jest.config.js Initial commit 11 months ago
package-lock.json Change search regex to use <br> instead of \n 11 months ago
package.json Add backslash escaping 10 months ago
rollup.config.umd.js Add bundler 11 months ago

README.md

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>

there is also an interactive CLI:

$ npm run dingus
marked-mfm interactive parser
version 0.0.0
> $[x2 beeg text]
<p><span class="mfm _mfm_x2_" >beeg text</span></p>

you should use it to figure out whether a bug is with marked-mfm or with the frontend it's used on.

contributing

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