README.md
      
      
        
        # Discount.ex [](https://travis-ci.org/asaaki/discount.ex)
Elixir NIF for **discount**, a Markdown parser ([GH: Orc/discount](https://github.com/Orc/discount)).
- [hex.pm/packages/discount](https://hex.pm/packages/discount)
## Add dependency (with `hex`)
```elixir
  defp deps do
    [
      { :discount, "~> 0.6.0" }
    ]
  end
```
## Test
```shell
make test
```
## Use
```shell
make
iex -S mix
```
```elixir
Discount.to_html "## markdown string"
#=> "<h2>markdown string</h2>"
# Alternatively pass the compiled document to a function:
Discount.to_html "## markdown string", my_callback_function_taking_one_argument
```
See [test examples](./test/discount_test.exs) for more detailed usage.
## License
[MIT/X11](./LICENSE)
Copyright (c) 2013—2014 Christoph Grabo