Standards compliant, fast, secure markdown processing library in C
Find a file
2015-07-13 23:54:07 +02:00
bin Little API detail; flip is_inline parameter to is_block 2015-07-12 23:45:02 +02:00
CommonMark@9584c98612 Now targetting CommonMark 0.17! 2015-02-22 17:06:55 +01:00
data Add GPERF dataset for Unicode case folding 2014-12-30 13:34:25 +01:00
src Little API detail; flip is_inline parameter to is_block 2015-07-12 23:45:02 +02:00
tools Add GPERF dataset for Unicode case folding 2014-12-30 13:34:25 +01:00
.editorconfig Add .editorconfig 2013-09-20 19:08:28 -05:00
.gitignore Squashed commits for rewrite 2014-11-03 23:02:45 +01:00
.gitmodules Now targeting CommonMark 0.13! 2014-12-23 21:26:48 +01:00
.travis.yml Hopefully fix Travis 2015-07-13 23:54:07 +02:00
CMakeLists.txt Testing now works correctly on out-of-source builds 2015-07-12 15:18:35 +02:00
LICENSE Update LICENSE 2014-12-29 12:11:24 +01:00
README.md Ooops! Correct benchmark value 2015-03-11 00:03:59 +01:00
spec.txt WE CAN NOW TEST WITH THE UNMODIFIED SPEC! HOORAY! 2015-07-12 23:14:34 +02:00

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.