Skip to content

Convert an Earmark AST back to a Markdown string. Shamelessly ripped out of the Livebook project

License

Notifications You must be signed in to change notification settings

michaelvigor/earmark_reversal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EarmarkReversal

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 👏

Usage

{:ok, ast, []} = EarmarkParser.as_ast("I just love **bold text**.")
EarmarkReversal.markdown_from_ast(ast)
"I just love **bold text**."

Installation

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.

LICENSE

Same as Livebook (and Elixir), which is Apache License v2.0. Please refer to LICENSE for details.

About

Convert an Earmark AST back to a Markdown string. Shamelessly ripped out of the Livebook project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages