Markdown in WordPress

Alright, after using various WYSIWYG editors in [WordPress](http://www.wordpress.org) (which I use to to write this blog), I got fed up and decided to switch to [Markdown](http://daringfireball.net/projects/markdown/). There are a couple of plug-ins to make this happen, in fact I’m using three, together they make using Markdown pretty nice in wordpress.

* “Markdown for WordPress and bbPress”, this plug-in (just search for it through the wordpress plugin manager) contains the [PHP Markdown](http://michelf.com/projects/php-markdown/) parser, which supports the whole of Markdown, plus a few [extras](http://michelf.com/projects/php-markdown/extra/) such as footnotes[¹]. It parses every post as Markdown, including the old ones, which wasn’t a problem for me because the HTML of previous posts is also Markdown and seems to look OK.
* “WP MarkItUp”, this plug-in contains a reasonable editor for editing Markdown, it doesn’t do much, but has some buttons for common Markdown markup (hahaha), such as headings, **bold**, _italic_ and so on. The plugin is based on [MarkItUp](http://markitup.jaysalvat.com/home/).
* [“highlight.js”](http://softwaremaniacs.org/soft/highlight/en/), is a pure-javascript syntax highlighter that automatically detects the language of code blocks, which is exactly what you need in Markdown, because there’s no way to mark a code block with a language name. You cannot install this plugin through the plugin manager, as far as I’m aware, so you have to download it and install it yourself (see the README of the download). Example of syntax highlighting (of Javascript):

~~~~~~~~~
for(var i = 0; i < ar.length; i++) {
 console.log(i);
}
~~~~~~~~~

Now let’s see how this works in practice.

[¹]: Which look like this, in case you were wondering.