MarkDown

A format for writing for the web by John Gruber. link

Implementations

MarkDown in Python

git clone git://github.com/waylan/Python-Markdown.git python-markdown
cd python-markdown
python setup.py install (need sudo, or do next step)
cp build/scripts-2.6/markdown_py ~/bin/

markdown_py file.txt > file.html

MarkDown in C

For PotBliki I started out with python-markdown but switched to Sundown since it carried no dependencies (except GCC to build it) and was a lot faster. The markdown phase of 'making' a PotBliki went from being a major part to being no time at all.

MarkDown in Objective-C

This gist show Upskirt added to a UIWebView as a category.

Examples

Line breaks

This is a sentence. This sentence end up on the same line. Force line break by inserting two spaces before end of line.
This sentence is on another line.

This is a sentence.
This sentence end up on the same line.
Force line break by inserting two spaces before end of line.  
This sentence is on another line.

Emphasis

italic and bold

_italic_ and __bold__

Code block

Code blocks are text indented four spaces.

Block quotes

Text in block quote. > Nested block quote.

> Text in block quote.
>> Nested block quote.

Horizontal divider

Above divider.


Below divider.

Above divider.

----

Below divider.

Lists

* Item 1
    * Subitem (4 space indent)
* Item 2

Headers

h1

h1

h2

h2

h3

h4

h5
h6
h1
==
# h1
h2
--
## h2
### h3
#### h4
##### h5
###### h6

Links

An example.

An [example](http://www.danielhjort.net/))

An example. Then, put the url anywhere.

An [example][1]. Then, put the url anywhere.

[1]: http://daringfireball.net/projects/markdown/syntax

[ IndexPage | Edit on Github | Powered by PotBliki | © 2010-2012 Daniel Hjort - CC BY-SA 3.0 | http://danielhjort.net ]

blog comments powered by Disqus