mudasobwa
Md - Stream-aware markdown parser with custom syntax setting
Md, a library to parse markdown and markdown-like syntaxes, has been released.
Fully-customizable syntax, blazingly fast (5× compared to earmark,) opinionated. It does not fully support Commonmark (and it’ll never do,) but it covers the needs of the average user + allows the introduction of custom markdown-like syntax with ease.
Most Liked
mudasobwa
Sorry for boosting my own thread, but I added two examples of how to use md in the wild.
One is about how to extend the existing syntax, another one is about how to create a syntax from scratch. See tests for how it works. Cheers.
mudasobwa
One might pass State to Md.parse/2 as a second parameter. Starting with v0.7.0 it has payload key.
All the listener functions can return a tuple {:update, new_state} to update the state.
mudasobwa
Yes, you might explicitly allow whatever you want to be parsed as markdown, including but not limited to the markdown syntax itself. E. g. magnet allows to declare a syntax for @handles and/or #hashtags.
derek-zhou
I am reading your code, it is very impressive. It is basically a framework to build ad-hoc parsers for any syntax. For example, you can have a syntax highlighter for any program languages. A server side rendering, elixir based syntax highlighter will be very sweet. I long for the day when I could remove prismjs from my js bundle. Keep it up!







