mudasobwa

mudasobwa

Creator of Cure

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.

Parser for Markdown Family

Most Liked

mudasobwa

mudasobwa

Creator of Cure

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

mudasobwa

Creator of Cure

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

mudasobwa

Creator of Cure

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

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!

Where Next?

Popular in Libraries Top

scohen
Lexical Lexical is a next-generation language server for the Elixir programming language. Features Context aware code completion As-you...
New
RobertDober
Earmark is a pure-Elixir Markdown converter. It is intended to be used as a library (just call Earmark.as_html), but can also be used as...
239 11851 134
New
tompave
Hello there, I would like to share a feature toggles library (AKA feature flags) I’ve been working on. The main package is FunWithFlags...
New
devonestes
Introducing assertions, the library that helps you write really great test assertions! GitHub: https://github.com/devonestes/assertions ...
New
mathieuprog
Hello :wave: Allow me to introduce you to Tz, an alternative time zone database support to Tzdata. Why another library? First and fore...
New
arkgil
Hi all! I’m happy to announce that Telemetry v0.3.0 is out! This release marks the conversion from Elixir to Erlang so that all the libr...
New
Qqwy
Hello everyone, I wrote a small library today called MapDiff. It returns a map listing the (smallest amount of) changes to get from map...
New
mbuhot
EctoJob A transactional job queue built with Ecto, PostgreSQL and GenStage Available on Hex.pm: ecto_job | Hex Docs: API Reference — ec...
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 42633 214
New
mattludwigs
Grizzly is a library for working with Z-Wave devices. Z-Wave is a low-frequency radio protocol for controlling smart home devices on a me...
New

Other popular topics Top

JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1140 51847 244
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 record...
New
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 45766 226
New
polypush135
As many of you may have realized by now (sorry for all the posts here) I’ve been working on a db problem where I’m trying to aggregate a ...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
TunkShif
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
273 38985 115
New

Sub Categories:

We're in Beta

About us Mission Statement