Convert an Earmark AST back to a Markdown string. All the code in this package has been ripped out of the Livebook project (specifically the MarkdownHelpers module) so it can be used as a standalone helper. No original code has been written for this package, so all credit should go to the original Livebook author Jonatan Kłosko 👏
{:ok, ast, []} = EarmarkParser.as_ast("I just love **bold text**.")
EarmarkReversal.markdown_from_ast(ast)
"I just love **bold text**."
If available in Hex, the package can be installed
by adding earmark_reversal
to your list of dependencies in mix.exs
:
def deps do
[
{:earmark_reversal, "~> 0.1.0"}
]
end
Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/earmark_reversal.
Same as Livebook (and Elixir), which is Apache License v2.0. Please refer to LICENSE for details.