hoedown/README.md
2015-03-11 00:03:59 +01:00

3.7 KiB

Hoedown

Build Status

Hoedown is a revived fork of Sundown, the Markdown parser based on the original code of the Upskirt library by Natacha Porté.

This branch has the code for version 4, in which Hoedown has been rewritten and is now targeting CommonMark officially.

Important: this code is in pre-alpha! Don't use it for production yet. The section below doesn't fully reflect the current features, but rather the goals for the final release.

Features

  • Standards compliant

    Hoedown follows the CommonMark spec and is tested against it. It's entirely compliant except for some differences needed mostly to guarantee security.

  • Fast and efficient

    Hoedown has been written with speed in mind; it reuses memory, operates without an intermediate AST and renders at the same time, among other things.

    Hoedown renders at 145% the speed of CMark (the reference C99 implementation) at the time of writing. We tested many documents: this README, the spec, John's syntax page, etc.

  • Portable and zero-dependency

    Hoedown is a zero-dependency library composed of some .c files and their headers. No dependencies, no bullshit. Only standard C89 that builds everywhere.

  • Increased flexibility

    Hoedown supports (unofficial) CommonMark extensions such as tables, math, footnotes, and more! The new version gives even more control, allowing you to enable or disable every single construct, not just extensions, at runtime.

  • Customizable renderers

    Hoedown is not stuck with HTML, renderers can output anything: TeX code, an AST tree, statistics about the parsed document, binary data, etc. Parsing is completely decoupled from rendering.

  • Precise source mapping

    Hoedown is more than a parser. It has character-level source mapping, both direct and indirect, which is also present at inline constructs. This allows for a variety of creative uses, see the recipes.

  • Safe for production

    Hoedown includes protection against possible attacks like out of memory situations, malformed syntax and extensive nesting. We've worked very hard to make Hoedown never leak, crash, loop or block under any input.

    Warning: Hoedown doesn't validate HTML found in Markdown documents. Unless you disable HTML parsing entirely, you should always feed the rendered HTML to Lanli or another sanitizer.

  • Unicode aware

    Hoedown is fully UTF-8 aware, both when parsing the source document and when generating the resulting HTML.

Bindings

You can see a community-maintained list of Hoedown bindings at the wiki.

Help us

Hoedown is all about security. If you find a (potential) security vulnerability in the library, or a way to make it crash through malicious input, please report it to us by emailing the private Hoedown Security mailing list. The Hoedown security team will review the vulnerability and work with you to reproduce and resolve it.

Install

To build the library and executable, use CMake:

cmake -D CMAKE_BUILD_TYPE=Release .
cmake --build .

Or just drop the files at src into your project. Hoedown doesn't have any special building requeriments.