A MFM parser implementation with PEG.js
npm i rosee
TypeScript:
import * as mfm from 'rosee';
const input =
`<center>
Hello [tada everynyan! 🎉]
I'm @ai, An bot of misskey!
https://github.com/syuilo/ai
</center>`;
// parse a MFM text
const result = mfm.parse(input);
// parse a MFM plain text
const plainResult = mfm.parsePlain('I like the hot soup :soup:');
git clone https://github.com/marihachi/rosee.git
cd rosee
npm i
npm run build
npm run parse
This software is released under the MIT License.