Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Elixir NIF for discount, a Markdown parser
Elixir Makefile C HTML
branch: master
Failed to load latest commit information.
discount_src @ b787bc3
lib Add docs tasks for hexdocs.pm
priv
src
test Clean up tests
.gitignore
.gitmodules
.travis.yml Try Travis Elixir version
LICENSE
Makefile Fix publishing targets
README.md
mix.exs
mix.lock Update project setup and info

README.md

Discount.ex

Hex.pm package version Hex.pm package license Build Status (master) Support via Gratipay

Elixir NIF for discount, a Markdown parser (GH: Orc/discount).


I recommend to use a strongly specified implementation of Markdown called CommonMark!

An Elixir library exists at GitHub: asaaki/cmark.ex, the Hex package at https://hex.pm/packages/cmark.

More about the reason can be read at http://commonmark.org/.


Add dependency (with hex)

{ :discount, "~> 0.7" }

Use

make
iex -S mix
Discount.to_html "## markdown string"
#=> "<h2>markdown string</h2>"

# Alternatively pass the compiled document to a function:
Discount.to_html "## markdown string", fn (html) ->
  do_something_with(html)
end

License

MIT/X11

Copyright (c) 2013—2015 Christoph Grabo

Something went wrong with that request. Please try again.