Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/asaaki/discount.ex
Elixir NIF for discount, a Markdown parser
https://github.com/asaaki/discount.ex
Last synced: 7 days ago
JSON representation
Elixir NIF for discount, a Markdown parser
- Host: GitHub
- URL: https://github.com/asaaki/discount.ex
- Owner: asaaki
- License: mit
- Archived: true
- Created: 2013-10-06T04:58:09.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2015-09-30T11:31:01.000Z (about 9 years ago)
- Last Synced: 2024-10-08T21:36:13.716Z (about 1 month ago)
- Language: Elixir
- Homepage: https://hex.pm/packages/discount
- Size: 545 KB
- Stars: 21
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- freaking_awesome_elixir - Elixir - Elixir NIF for discount, a Markdown parser. (Markdown)
- fucking-awesome-elixir - discount - Elixir NIF for discount, a Markdown parser. (Markdown)
- awesome-elixir - discount - Elixir NIF for discount, a Markdown parser. (Markdown)
README
# Discount.ex
[![Hex.pm package version](https://img.shields.io/hexpm/v/discount.svg?style=flat-square)](https://hex.pm/packages/discount)
[![Hex.pm package license](https://img.shields.io/hexpm/l/discount.svg?style=flat-square)](https://github.com/asaaki/discount.ex/blob/master/LICENSE)
[![Build Status (master)](https://img.shields.io/travis/asaaki/discount.ex/master.svg?style=flat-square)](https://travis-ci.org/asaaki/discount.ex)
[![Support via Gratipay](http://img.shields.io/gratipay/asaaki.svg?style=flat-square)](https://gratipay.com/asaaki)Elixir NIF for **discount**, a Markdown parser ([GH: Orc/discount](https://github.com/Orc/discount)).
----
**I recommend to use a strongly specified implementation of Markdown called CommonMark!**
An Elixir library exists at [GitHub: asaaki/cmark.ex](https://github.com/asaaki/cmark.ex), the Hex package at .
More about the reason can be read at .
----
## Add dependency (with `hex`)
```elixir
{ :discount, "~> 0.7" }
```## Use
```shell
make
iex -S mix
``````elixir
Discount.to_html "## markdown string"
#=> "markdown string
"# Alternatively pass the compiled document to a function:
Discount.to_html "## markdown string", fn (html) ->
do_something_with(html)
end
```## License
[MIT/X11](./LICENSE)
Copyright (c) 2013—2015 Christoph Grabo