2013-09-19 14:25:00 +00:00
|
|
|
Hoedown
|
2011-04-15 08:36:46 +00:00
|
|
|
=======
|
|
|
|
|
2013-09-26 01:17:30 +00:00
|
|
|
[![Build Status](https://travis-ci.org/hoedown/hoedown.png?branch=master)](https://travis-ci.org/hoedown/hoedown)
|
2013-09-21 01:02:58 +00:00
|
|
|
|
2013-09-19 14:25:00 +00:00
|
|
|
`Hoedown` is a revived fork of [Sundown](https://github.com/vmg/sundown),
|
|
|
|
the Markdown parser based on the original code of the
|
|
|
|
[Upskirt library](http://fossil.instinctive.eu/libupskirt/index)
|
|
|
|
by Natacha Porté.
|
2011-04-15 08:36:46 +00:00
|
|
|
|
2011-07-18 21:27:33 +00:00
|
|
|
Features
|
|
|
|
--------
|
2011-04-15 08:58:19 +00:00
|
|
|
|
2011-07-19 08:03:14 +00:00
|
|
|
* **Fully standards compliant**
|
2011-04-15 08:36:46 +00:00
|
|
|
|
2013-09-19 14:25:00 +00:00
|
|
|
`Hoedown` passes out of the box the official Markdown v1.0.0 and v1.0.3
|
2011-04-15 08:36:46 +00:00
|
|
|
test suites, and has been extensively tested with additional corner cases
|
|
|
|
to make sure its output is as sane as possible at all times.
|
|
|
|
|
2011-07-18 21:27:33 +00:00
|
|
|
* **Massive extension support**
|
2011-04-15 08:36:46 +00:00
|
|
|
|
2013-09-19 14:25:00 +00:00
|
|
|
`Hoedown` has optional support for several (unofficial) Markdown extensions,
|
2011-04-15 08:36:46 +00:00
|
|
|
such as non-strict emphasis, fenced code blocks, tables, autolinks,
|
|
|
|
strikethrough and more.
|
|
|
|
|
2011-09-02 21:28:20 +00:00
|
|
|
* **UTF-8 aware**
|
|
|
|
|
2013-09-19 14:25:00 +00:00
|
|
|
`Hoedown` is fully UTF-8 aware, both when parsing the source document and when
|
2011-09-02 21:28:20 +00:00
|
|
|
generating the resulting (X)HTML code.
|
|
|
|
|
2011-07-18 21:27:33 +00:00
|
|
|
* **Tested & Ready to be used on production**
|
2011-09-02 21:07:02 +00:00
|
|
|
|
2013-09-20 14:41:40 +00:00
|
|
|
`Hoedown` has been extensively security audited, and includes protection against
|
2011-04-15 08:36:46 +00:00
|
|
|
all possible DOS attacks (stack overflows, out of memory situations, malformed
|
|
|
|
Markdown syntax...) and against client attacks through malicious embedded HTML.
|
|
|
|
|
2013-09-20 14:41:40 +00:00
|
|
|
We've worked very hard to make `Hoedown` never crash or run out of memory
|
2013-09-21 10:00:59 +00:00
|
|
|
under *any* input.
|
2011-04-15 08:36:46 +00:00
|
|
|
|
2011-07-18 21:27:33 +00:00
|
|
|
* **Customizable renderers**
|
2011-04-15 08:36:46 +00:00
|
|
|
|
2013-09-19 14:25:00 +00:00
|
|
|
`Hoedown` is not stuck with XHTML output: the Markdown parser of the library
|
2011-04-15 08:36:46 +00:00
|
|
|
is decoupled from the renderer, so it's trivial to extend the library with
|
2011-07-18 21:27:33 +00:00
|
|
|
custom renderers. A fully functional (X)HTML renderer is included.
|
2011-04-15 08:36:46 +00:00
|
|
|
|
2011-07-18 21:27:33 +00:00
|
|
|
* **Optimized for speed**
|
2011-04-15 08:36:46 +00:00
|
|
|
|
2013-09-19 14:25:00 +00:00
|
|
|
`Hoedown` is written in C, with a special emphasis on performance. When wrapped
|
2011-04-15 08:36:46 +00:00
|
|
|
on a dynamic language such as Python or Ruby, it has shown to be up to 40
|
|
|
|
times faster than other native alternatives.
|
|
|
|
|
2011-07-18 21:27:33 +00:00
|
|
|
* **Zero-dependency**
|
2011-04-15 08:36:46 +00:00
|
|
|
|
2013-09-20 16:26:18 +00:00
|
|
|
`Hoedown` is a zero-dependency library composed of 4 `.c` files and their headers.
|
2011-04-15 08:36:46 +00:00
|
|
|
No dependencies, no bullshit. Only standard C99 that builds everywhere.
|
|
|
|
|
2011-05-11 17:11:55 +00:00
|
|
|
Bindings
|
|
|
|
--------
|
|
|
|
|
2013-09-20 15:28:25 +00:00
|
|
|
You can see a community-maintained list of `Hoedown` bindings at
|
2013-10-03 11:42:29 +00:00
|
|
|
[the wiki](https://github.com/hoedown/hoedown/wiki/Bindings). There is also a
|
2013-09-27 23:07:44 +00:00
|
|
|
[migration guide](https://github.com/hoedown/hoedown/wiki/Migration-Guide)
|
|
|
|
available for authors of Sundown bindings.
|
2011-05-11 17:11:55 +00:00
|
|
|
|
2011-04-15 08:36:46 +00:00
|
|
|
Help us
|
|
|
|
-------
|
|
|
|
|
2013-09-19 14:25:00 +00:00
|
|
|
`Hoedown` is all about security. If you find a (potential) security vulnerability in the
|
2014-01-20 02:33:39 +00:00
|
|
|
library, or a way to make it crash through malicious input, please report it to us by
|
|
|
|
emailing the private [Hoedown Security](mailto:hoedown-security@googlegroups.com)
|
|
|
|
mailing list. The `Hoedown` security team will review the vulnerability and work with you
|
|
|
|
to reproduce and resolve it.
|
2011-04-15 08:36:46 +00:00
|
|
|
|
2011-09-02 21:28:20 +00:00
|
|
|
Unicode character handling
|
|
|
|
--------------------------
|
|
|
|
|
2013-09-19 14:25:00 +00:00
|
|
|
Given that the Markdown spec makes no provision for Unicode character handling, `Hoedown`
|
2011-09-02 21:28:20 +00:00
|
|
|
takes a conservative approach towards deciding which extended characters trigger Markdown
|
|
|
|
features:
|
|
|
|
|
|
|
|
* Punctuation characters outside of the U+007F codepoint are not handled as punctuation.
|
|
|
|
They are considered as normal, in-word characters for word-boundary checks.
|
|
|
|
|
|
|
|
* Whitespace characters outside of the U+007F codepoint are not considered as
|
|
|
|
whitespace. They are considered as normal, in-word characters for word-boundary checks.
|
|
|
|
|
2011-04-15 08:36:46 +00:00
|
|
|
Install
|
|
|
|
-------
|
|
|
|
|
2013-09-20 16:07:03 +00:00
|
|
|
There is nothing to install. `Hoedown` is composed of 4 `.c` files (`markdown.c`,
|
2013-09-20 16:26:18 +00:00
|
|
|
`buffer.c`, `stack.c`, and `autolink.c`) and their headers, so just throw them in your
|
|
|
|
project. Zero-dependency means zero-dependency. You might want to include `html.c`,
|
|
|
|
`html_smartypants.c` and `escape.c` if you want to use the included XHTML renderer, or
|
|
|
|
write your own renderer. Either way, it's all fun and joy.
|
2011-04-15 08:36:46 +00:00
|
|
|
|
2013-09-19 14:25:00 +00:00
|
|
|
If you are hardcore, you can use the included `Makefile` to build `Hoedown` into a dynamic
|
2013-09-20 16:26:18 +00:00
|
|
|
library, or to build the sample `hoedown` executable, which is just a commandline
|
2013-09-21 10:10:46 +00:00
|
|
|
Markdown to XHTML parser.
|