Localize.Message.Formatter (Localize v0.38.0)

Copy Markdown View Source

Dispatch module for rendering MF2 highlight tokens.

Delegates to one of the format-specific formatter modules based on the :format option:

Summary

Functions

Renders a token list in the chosen format.

Types

format()

@type format() :: :plain | :html | :ansi

Functions

render(tokens, format, options \\ [])

Renders a token list in the chosen format.

Arguments

  • tokens is a list of t:Highlighter.token/0 tuples.

  • format is one of :plain, :html, or :ansi.

  • options is a keyword list of format-specific options.

Returns

  • A rendered string.