mfm_parser 1.0.0 mfm_parser: ^1.0.0 copied to clipboard
mfm (Markup Language For Misskey) parser for dart.
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
if you use flutter,
flutter pub add mfm_parser
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);
TODO #
These feature will be supported in the future.
- This package is not compatible with 'toString()' and many api from the official mfm.js.
- This package is not support math-inline and math-block.