simple_markdown_extension_cli v0.1.2 SimpleMarkdownExtensionCLI.Renderer protocol
A renderer protocol for ANSI escaped text.
Individual rule renderers can be overriden or new ones may be
added. Works in the same way as SimpleMarkdown.Renderer.HTML
.
Example
defimpl SimpleMarkdownExtensionCLI.Renderer, for: SimpleMarkdown.Attribute.Code do
def render(%{ input: input }), do: IO.ANSI.cyan <> SimpleMarkdownExtensionCLI.Renderer.render(input) <> IO.ANSI.reset
end
Link to this section Summary
Functions
Render the parsed markdown as ANSI escaped text
Link to this section Types
Link to this section Functions
Link to this function
render(ast)
render([SimpleMarkdown.attribute() | String.t()] | SimpleMarkdown.attribute() | String.t()) :: String.t()
Render the parsed markdown as ANSI escaped text.