# `MfmParser.Parser`
[🔗](https://git.pleroma.social/pleroma-elixir-libraries/mfm-parser)

`MfmParser` is a [FEP-c16b](https://codeberg.org/fediverse/fep/src/branch/main/fep/c16b/fep-c16b.md) compatible parser for Misskey's [Markup language For Misskey](https://misskey-hub.net/en/docs/for-users/features/mfm/) MFM functions.

It can parse a string representing text containing MFM functions and return a tree. There's also has an encoder who can turn a tree into HTML.

It only parses the MFM specific tags of the form $[name.opts content].

Other parts of MFM (html, Markdown and [KaTeX](https://katex.org/)) are out of scope for this project.

## Examples

    iex> MfmParser.Parser.parse("$[twitch.speed=0.5s 🍮]")
    [
      %MfmParser.Node.MFM{
        name: "twitch",
        attributes: [{"speed", "0.5s"}],
        content: [%MfmParser.Node.Text{content: "🍮"}]
      }
    ]

# `parse`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
