saulecabrera
Markdownif - Fast and Secure Markdown NIFs built with Rustler and pulldown-cmark
Markdownif implements bindings for pulldown-cmark using Rustler.
Why?
Most of the available libraries that I explored didn’t meet my needs in terms of speed with the exception of markdown. I also wanted to try Rustler and this use case is the perfect fit.
Features
- Fast: check out the benchmarks
- Safe: Markdownif defers the NIF execution to the dirty schedulers based on the input size and on measurements around the dirty scheduling overhead.
- Correct: pulldown-cmark complies 100% with the CommonMark spec
Source: GitHub - saulecabrera/markdownif: Safe + Fast Markdown NIFs · GitHub
Most Liked
saulecabrera
Do you support the cmark flags for additional functionality that go beyond the base spec?
@OvermindDL1 Do you mean support for task lists, tables, strikethrough, and footnotes? If that’s the case, those options are indeed supported, when parsing an input you can specify which of these you need, for example:
Markdownif.to_html(input, %Markdownif.Features{tables: true})
OvermindDL1
Yep that’s what I meant, awesome thanks!
valpackett
Cool! I’ve been thinking of creating a library like this, but with a bonus feature of directly emitting an html tree instead of a string (to avoid reparsing when postprocessing the markdown with HTML processors). I guess I’ll send a PR to this project instead when I come around to doing this ![]()
Popular in Announcing
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









