Markdown parsing within Elm


License: BSD-3-Clause

Language: Elm

Markdown in Elm

This package is for markdown parsing and rendering. It is based on the marked project which focuses on speed.

Basic Usage

content : Html msg
content =
   Markdown.toHtml [class "content"] """

# Apple Pie Recipe

  1. Invent the universe.
  2. Bake an apple pie.


Warning: Calling Markdown.toHtml parses the whole block, so try not to call it for no reason. In the content example above we only have to parse the text once, but if we put it in a function we may be doing a lot of unnecessary parsing.

Code Blocks

For highlighting any code blocks, the package relies on the highlight.js project. So if you want to see highlighting of code blocks in the rendering result, you need to make sure that your page/app binds a version of that library (supporting the languages you want to handle) to window.hljs in Javascript. This is how package.elm-lang.org does that.

Project Statistics

Sourcerank 12
Repository Size 44.9 KB
Stars 74
Forks 14
Watchers 7
Open issues 6
Dependencies 2
Contributors 6
Tags 12
Last updated
Last pushed

Top Contributors See all

Janis Voigtländer Evan Czaplicki Marica Odagaki HIGASHI Taiju Noah sabine

Packages Referencing this Repo

Fast markdown parsing and rendering
Latest release 3.0.2 - Updated - 74 stars

Recent Tags See all

3.0.2 March 10, 2017
3.0.1 November 14, 2016
3.0.0 April 05, 2016
2.0.1 January 18, 2016
2.0.0 October 03, 2015
1.1.5 July 19, 2015
1.1.4 March 27, 2015
1.1.3 February 18, 2015
1.1.2 January 16, 2015
1.1.1 December 28, 2014
1.1.0 December 03, 2014
1.0.0 December 01, 2014

Interesting Forks See all

Markdown parsing within Elm
Elm - Updated - 1 stars

Something wrong with this page? Make a suggestion

Last synced: 2017-03-11 01:02:41 UTC

Login to resync this repository