PageRenderTime 60ms CodeModel.GetById 28ms RepoModel.GetById 0ms app.codeStats 0ms

/README.markdown

https://github.com/roddi/sundown
Markdown | 131 lines | 95 code | 36 blank | 0 comment | 0 complexity | 7305342a6875e0a40231d66cb8c23f74 MD5 | raw file
  1. Sundown
  2. =======
  3. `Sundown` is a Markdown parser based on the original code of the
  4. [Upskirt library](http://fossil.instinctive.eu/libupskirt/index) by Natacha Porté.
  5. Features
  6. --------
  7. * **Fully standards compliant**
  8. `Sundown` passes out of the box the official Markdown v1.0.0 and v1.0.3
  9. test suites, and has been extensively tested with additional corner cases
  10. to make sure its output is as sane as possible at all times.
  11. * **Massive extension support**
  12. `Sundown` has optional support for several (unofficial) Markdown extensions,
  13. such as non-strict emphasis, fenced code blocks, tables, autolinks,
  14. strikethrough and more.
  15. * **UTF-8 aware**
  16. `Sundown` is fully UTF-8 aware, both when parsing the source document and when
  17. generating the resulting (X)HTML code.
  18. * **Tested & Ready to be used on production**
  19. `Sundown` has been extensively security audited, and includes protection against
  20. all possible DOS attacks (stack overflows, out of memory situations, malformed
  21. Markdown syntax...) and against client attacks through malicious embedded HTML.
  22. We've worked very hard to make `Sundown` never crash or run out of memory
  23. under *any* input. `Sundown` renders all the Markdown content in GitHub and so
  24. far hasn't crashed a single time.
  25. * **Customizable renderers**
  26. `Sundown` is not stuck with XHTML output: the Markdown parser of the library
  27. is decoupled from the renderer, so it's trivial to extend the library with
  28. custom renderers. A fully functional (X)HTML renderer is included.
  29. * **Optimized for speed**
  30. `Sundown` is written in C, with a special emphasis on performance. When wrapped
  31. on a dynamic language such as Python or Ruby, it has shown to be up to 40
  32. times faster than other native alternatives.
  33. * **Zero-dependency**
  34. `Sundown` is a zero-dependency library composed of 3 `.c` files and their headers.
  35. No dependencies, no bullshit. Only standard C99 that builds everywhere.
  36. Credits
  37. -------
  38. `Sundown` is based on the original Upskirt parser by Natacha Porté, with many additions
  39. by Vicent Marti (@tanoku) and contributions from the following authors:
  40. Ben Noordhuis, Bruno Michel, Joseph Koshy, Krzysztof Kowalczyk, Samuel Bronson,
  41. Shuhei Tanuma
  42. Bindings
  43. --------
  44. `Sundown` is available from other programming languages thanks to these bindings developed
  45. by our awesome contributors.
  46. - [Redcarpet](https://github.com/tanoku/redcarpet) (Ruby)
  47. - [RobotSkirt](https://github.com/benmills/robotskirt) (Node.js)
  48. - [Misaka](https://github.com/FSX/misaka) (Python)
  49. - [ffi-sundown](https://github.com/postmodern/ffi-sundown) (Ruby FFI)
  50. - [Sundown HS](https://github.com/rostayob/sundown) (Haskell)
  51. - [Goskirt](https://github.com/madari/goskirt) (Go)
  52. - [Upskirt.go](https://github.com/buu700/upskirt.go) (Go)
  53. - [MoonShine](https://github.com/brandonc/moonshine) (.NET)
  54. - [PHP-Sundown](https://github.com/chobie/php-sundown) (PHP)
  55. - [Sundown.net](https://github.com/txdv/sundown.net) (.NET)
  56. Help us
  57. -------
  58. `Sundown` is all about security. If you find a (potential) security vulnerability in the
  59. library, or a way to make it crash through malicious input, please report it to us,
  60. either directly via email or by opening an Issue on GitHub, and help make the web safer
  61. for everybody.
  62. Unicode character handling
  63. --------------------------
  64. Given that the Markdown spec makes no provision for Unicode character handling, `Sundown`
  65. takes a conservative approach towards deciding which extended characters trigger Markdown
  66. features:
  67. * Punctuation characters outside of the U+007F codepoint are not handled as punctuation.
  68. They are considered as normal, in-word characters for word-boundary checks.
  69. * Whitespace characters outside of the U+007F codepoint are not considered as
  70. whitespace. They are considered as normal, in-word characters for word-boundary checks.
  71. Install
  72. -------
  73. There is nothing to install. `Sundown` is composed of 3 `.c` files (`markdown.c`,
  74. `buffer.c` and `array.c`), so just throw them in your project. Zero-dependency means
  75. zero-dependency. You might want to include `render/html.c` if you want to use the
  76. included XHTML renderer, or write your own renderer. Either way, it's all fun and joy.
  77. If you are hardcore, you can use the included `Makefile` to build `Sundown` into a dynamic
  78. library, or to build the sample `sundown` executable, which is just a commandline
  79. Markdown to XHTML parser. (If gcc gives you grief about `-fPIC`, e.g. with MinGW, try
  80. `make MFLAGS=` instead of just `make`.)
  81. License
  82. -------
  83. Permission to use, copy, modify, and distribute this software for any
  84. purpose with or without fee is hereby granted, provided that the above
  85. copyright notice and this permission notice appear in all copies.
  86. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  87. WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  88. MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  89. ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  90. WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  91. ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  92. OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  93. <!-- Local Variables: -->
  94. <!-- fill-column: 89 -->
  95. <!-- End: -->