mfm_parser 1.0.5 copy "mfm_parser: ^1.0.5" to clipboard
mfm_parser: ^1.0.5 copied to clipboard

mfm (Markup Language For Misskey) parser for dart. it provides feature that text convert misskey node and properties.

mfm_parser #

MFM (Misskey Flavor Markdown) parser implementation for dart.

This package is not renderer of the mfm.

Features #

This package was ported from typescript project of misskey-dev/mfm.js and depended on twitter/twemoji-parser too.

Getting started #

dart pub add mfm_parser
copied to clipboard

if you use flutter,

flutter pub add mfm_parser
copied to clipboard

Usage #

you can use MfmParser().parse() or MfmParser().parseSimple(). simpleParser is only supported to the text and emoji. you can used it for such as user name.

final text = r"""
<center>$[x2 **What's @ai**]</center>
@ai is official mascot character of the Misskey.
you can see more information from <https://xn--931a.moe/>
""";

final list = const MfmParser().parse(text);

print(list);
copied to clipboard

TODO #

These feature will be supported in the future.

  • This package is not compatible with 'toString()' and many api from the official mfm.js.
2
likes
150
points
67
downloads

Publisher

verified publishershiosyakeyakini.info

Weekly Downloads

2024.09.19 - 2025.04.03

mfm (Markup Language For Misskey) parser for dart. it provides feature that text convert misskey node and properties.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

collection

More

Packages that depend on mfm_parser