2011-04-15 08:36:46 +00:00
|
|
|
Upskirt
|
|
|
|
=======
|
|
|
|
|
|
|
|
> The Markdown library that sucks less than your Markdown library
|
|
|
|
|
2011-04-15 08:58:19 +00:00
|
|
|
Why doesn't Upskirt suck?
|
|
|
|
-------------------------
|
|
|
|
|
|
|
|
Markdown is not easy to parse: it's not well standarized, and has a ton of unofficial
|
|
|
|
extensions and corner cases which makes writing a parser for it not trivial. This also
|
|
|
|
makes any Markdown parser or converter inherently sucky. Here's why Upskirt is the
|
|
|
|
least sucky of the Markdown parsers:
|
|
|
|
|
2011-04-19 20:24:44 +00:00
|
|
|
* **If your Markdown library is not standards compliant, Upskirt is.**
|
2011-04-15 08:36:46 +00:00
|
|
|
|
|
|
|
Upskirt passes out of the box the official Markdown v1.0.0 and v1.0.3
|
|
|
|
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-04-15 08:58:19 +00:00
|
|
|
* **If your Markdown library doesn't support Markdown extensions, Upskirt does.**
|
2011-04-15 08:36:46 +00:00
|
|
|
|
|
|
|
Upskirt has optional support for several (unofficial) Markdown extensions,
|
|
|
|
such as non-strict emphasis, fenced code blocks, tables, autolinks,
|
|
|
|
strikethrough and more.
|
|
|
|
|
2011-04-15 08:58:19 +00:00
|
|
|
* **If your Markdown library is ready to be used in production, you are probably in
|
|
|
|
for a surprise.**
|
2011-04-15 08:36:46 +00:00
|
|
|
|
|
|
|
Upskirt is the only Markdown library ready to be used in a production environment
|
|
|
|
where users can submit arbritrary and potentially malicious contents to render.
|
|
|
|
|
|
|
|
Upskirt has been extensively security audited, and includes protection against
|
|
|
|
all possible DOS attacks (stack overflows, out of memory situations, malformed
|
|
|
|
Markdown syntax...) and against client attacks through malicious embedded HTML.
|
|
|
|
|
|
|
|
We've worked very hard to make Upskirt never crash or run out of memory
|
|
|
|
under *any* input. Upskirt renders all the Markdown content in GitHub and so
|
|
|
|
far hasn't crashed a single time.
|
|
|
|
|
2011-04-15 08:58:19 +00:00
|
|
|
* **If your Markdown library only does HTML, Upskirt does much more.**
|
2011-04-15 08:36:46 +00:00
|
|
|
|
|
|
|
Upskirt is not stuck with XHTML output: the Markdown parser of the library
|
|
|
|
is decoupled from the renderer, so it's trivial to extend the library with
|
|
|
|
custom renderers. A fully functional XHTML renderer is included.
|
|
|
|
|
2011-04-15 08:58:19 +00:00
|
|
|
* **If your Markdown library is slow, Upskirt is not.**
|
2011-04-15 08:36:46 +00:00
|
|
|
|
|
|
|
Upskirt is written in C, with a special emphasis on performance. When wrapped
|
|
|
|
on a dynamic language such as Python or Ruby, it has shown to be up to 40
|
|
|
|
times faster than other native alternatives.
|
|
|
|
|
2011-05-05 14:46:49 +00:00
|
|
|
* **If your Markdown library has unreasonable dependencies, Upskirt doesn't.**
|
2011-04-15 08:36:46 +00:00
|
|
|
|
|
|
|
Upskirt is a zero-dependency library composed of 3 `.c` files and their headers.
|
|
|
|
No dependencies, no bullshit. Only standard C99 that builds everywhere.
|
|
|
|
|
2011-05-05 14:46:49 +00:00
|
|
|
Credits
|
|
|
|
-------
|
2011-04-15 08:36:46 +00:00
|
|
|
|
2011-05-05 14:46:49 +00:00
|
|
|
Upskirt wouldn't be possible without the contributions of the following people:
|
2011-04-15 08:36:46 +00:00
|
|
|
|
2011-06-05 18:52:25 +00:00
|
|
|
* Natacha Porté (original author,
|
|
|
|
[project page](http://fossil.instinctive.eu/libupskirt/index))
|
2011-05-05 14:46:49 +00:00
|
|
|
* Vicent Martí
|
|
|
|
* Ben Noordhuis
|
|
|
|
* Bruno Michel
|
2011-04-15 08:36:46 +00:00
|
|
|
|
2011-05-11 17:11:55 +00:00
|
|
|
Bindings
|
|
|
|
--------
|
|
|
|
|
2011-06-05 18:52:25 +00:00
|
|
|
Upskirt is available from other programming languages thanks to these bindings developed
|
|
|
|
by our awesome contributors.
|
2011-05-11 17:11:55 +00:00
|
|
|
|
|
|
|
- [Redcarpet](https://github.com/tanoku/redcarpet) (Ruby)
|
|
|
|
- [RobotSkirt](https://github.com/benmills/robotskirt) (Node.js)
|
2011-07-05 01:22:47 +00:00
|
|
|
- [Misaka](https://github.com/FSX/misaka) (Python)
|
2011-05-11 17:11:55 +00:00
|
|
|
- [ffi-Upskirt](https://github.com/postmodern/ffi-upskirt) (Ruby FFI)
|
2011-05-11 17:13:51 +00:00
|
|
|
- [Upskirt HS](https://github.com/rostayob/upskirt) (Haskell)
|
2011-05-24 16:10:19 +00:00
|
|
|
- [Goskirt](https://github.com/madari/goskirt) (Go)
|
|
|
|
- [Upskirt.go](https://github.com/buu700/upskirt.go) (Go)
|
2011-06-02 22:18:01 +00:00
|
|
|
- [DownBlouse](https://github.com/brandonc/downblouse) (.NET)
|
2011-06-23 16:38:03 +00:00
|
|
|
- [PHPSkirt](https://github.com/chobie/phpskirt) (PHP)
|
2011-05-11 17:11:55 +00:00
|
|
|
|
2011-04-15 08:36:46 +00:00
|
|
|
Help us
|
|
|
|
-------
|
|
|
|
|
2011-06-05 18:52:25 +00:00
|
|
|
Upskirt 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,
|
|
|
|
either directly via email or by opening an Issue on GitHub, and help make the web safer
|
|
|
|
for everybody.
|
2011-04-15 08:36:46 +00:00
|
|
|
|
|
|
|
Install
|
|
|
|
-------
|
|
|
|
|
2011-06-05 18:52:25 +00:00
|
|
|
There is nothing to install. Upskirt is composed of 3 `.c` files (`markdown.c`,
|
|
|
|
`buffer.c` and `array.c`), so just throw them in your project. Zero-dependency means
|
|
|
|
zero-dependency. You might want to include `render/xhtml.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
|
|
|
|
2011-06-05 18:52:25 +00:00
|
|
|
If you are hardcore, you can use the included `Makefile` to build Upskirt into a dynamic
|
|
|
|
library, or to build the sample `markdown` executable, which is just a commandline
|
2011-06-05 18:54:22 +00:00
|
|
|
Markdown to XHTML parser. (If gcc gives you grief about `-fPIC`, e.g. with MinGW, try
|
|
|
|
`make MFLAGS=` instead of just `make`.)
|
2011-04-15 08:36:46 +00:00
|
|
|
|
|
|
|
License
|
|
|
|
-------
|
|
|
|
|
|
|
|
Permission to use, copy, modify, and distribute this software for any
|
|
|
|
purpose with or without fee is hereby granted, provided that the above
|
|
|
|
copyright notice and this permission notice appear in all copies.
|
|
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
|
|
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
|
|
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
|
|
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
|
|
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
|
|
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
|
|
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
2011-06-05 18:52:25 +00:00
|
|
|
|
|
|
|
<!-- Local Variables: -->
|
|
|
|
<!-- fill-column: 89 -->
|
|
|
|
<!-- End: -->
|