Syntax
The kramdown syntax is based on Markdown, a very easy to write, easy to read markup for writing HTML documents in plain text. Since the basic Markdown syntax has some shortcomings, implementations (especially the PHP Markdown Extra package) have tried to overcome this shortcomings with additional syntax. kramdown supports all features of the original Markdown syntax (albeit with some minor corrections) as well as newer features implemented in the PHP Markdown Extra package and Maruku.
For a complete description of the implemented syntax, have a look at the Syntax page.
Usage
The kramdown package provides two ways for using it:
-
As a library
kramdown uses basically the same API as RedCloth, BlueCloth and Maruku:
1 require 'kramdown' 2 3 Kramdown::Document.new(text).to_html
The second parameter to the
newcall is an options hash for (de)activating certain features. For more information have a look at the API documentation. -
As an application
Together with the library files a binary called
kramdownis shipped which can be used to convert text in kramdown syntax to HTML. It either reads from the files specified as the command line arguments or from the standard input. For example:kramdown path/to/kramdown/doc/syntax.page
Tests
kramdown uses various test suites to verify the correct working of the parser and the HTML converter. For more information, have a look at the tests document.
Bugs, Forums, Mailing Lists
If you have found a bug, you should report it here. Also, there are forums and mailing lists available if you have any questions!
Author
- Thomas Leitner
- e-Mail: t_leitner@gmx.at
- GPG Key-Id: 0xB2D0A854