SpawnFest 2021
Marker is an Erlang Markdown library, including parser and renderer.
The project has been created during the SpawnFest 2021
hackathon and consists of two parts:
marker
Erlang library in the marker/
directory exporting functionsmarker-web/
directory presenting the way Markdown documentsAs the marker
is a library, it cannot be run on its own, but the build/test
instructions can be found under marker/
directory in its README.md
file.
The demo project, marker_web
is built in Elixir, uses Phoenix and can be run usingmix phx.server
command. Detailed instructions, as above, can be found
in the marker_web/
directory.
The library, marker
is build with a focus on the CommonMark specification
and uses hand written parser inspired by the CommonMark’s parsing strategy (because of time constraints it doesn’t follow it fully).
The website uses LiveView to pass input text to the parser and renderer,
gets resulting HTML and displays it immediately as a part of the page.
The parsing process consists of two parts/steps:
Rendering process is much easier than parsing as it’s only generates strings
surrounded by proper HTML tags.
Renderer takes a document tree generated in the parsing phase, walks through that
and generated string representation of the children using the order stated
by parser.
Currenly marker
(to some buggy extend) supports these Markdown elements:
TBD:
The project has been created by the BKLH team of two: