evancz/elm-markdown 3.0.2

Fast markdown parsing and rendering

Platform: Elm

Language: Elm

License: BSD-3-Clause

Repository: https://github.com/evancz/elm-markdown

View on registry: http://package.elm-lang.org/packages/evancz/elm-markdown/3.0.2

Direct download link: https://github.com/evancz/elm-markdown/archive/3.0.2.zip

Install: elm-package install evancz/elm-markdown 3.0.2


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.

Sustain

Releases

3.0.2 March 11, 2017
3.0.1 November 14, 2016
3.0.0 May 10, 2016
2.0.1 January 19, 2016
2.0.0 November 18, 2015
1.1.5 July 20, 2015
1.1.4 April 20, 2015
1.1.3 March 23, 2015
1.1.2 March 23, 2015
1.1.1 March 23, 2015
See all 12 releases

Project Statistics

SourceRank 16
Dependencies 2
Dependent projects 11
Dependent repositories 281
Total releases 12
Latest release
First release
Stars 61
Forks 9
Watchers 5
Contributors 6
Repo Size: 82 KB

Top Contributors See all

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

Something wrong with this page? Make a suggestion

Export .ABOUT file for this library

Last synced: 2017-05-04 10:19:00 UTC

Login to resync this project