Markdown Extra GeSHi
This is an integration project that combines Markdown Extra, an extension to the Markdown language with GeSHi, a Generic Syntax Highlighter.
I started using Markdown syntax in 2005 due to its simplicity and effectiveness. The Markdown Extra extension was a nice addition, but I always wanted syntax highlighting for my code blocks. GeSHi is a great syntax highlighter; thus the three combine for various uses as a:
- Web-based Converter
- TextMate Bundle
- MediaWiki Extension
Web-based Converter
No need to install anything: you can convert your Markdown, Markdown Extra, and Markdown Extra GeSHi to HTML in your browser.
TextMate Bundle
The TextMate Bundle offers quick preview (Control+Alt+Command+P) of your Markdown Extra GeSHi document.
Download Markdown Extra GeSHi TextMate Bundle.
MediaWiki Extension
Unlike the other Markdown MediaWiki extensions, this one behaves exactly like the other tools here: all the syntax works. The downside is that MediaWiki will not parse the document so it will not count links to other pages or generate a "Table of Contents" for you.
Installation is simple: extract the download into the "extensions" directory and add the following to the bottom of the "LocalSettings.php" file:
require_once("$IP/extensions/MarkdownExtraGeshiSyntax/MarkdownExtraGeshiSyntax.php");
Usage is simple: just surround your markdown text with <markdown> tags:
<markdown> Markdown syntax here </markdown>
Download MarkdownExtraGeshiSyntax MediaWiki Extension.
Visit MarkdownExtraGeshiSyntax MediaWiki Extension Page.
Usage Tips
The web-based converter and TextMate bundle are meant to make copying the result as easy as possible: just highlight the result with Command+A, then copy and paste it (e.g. into an HTML/rich text e-mail).
Special Mention
Thanks go to:
- Dougal Stanton for his Syntax highlighting with Markdown in WordPress post.
- Michel Fortin for PHP Markdown Extra.
- GeSHi developers for GeSHi.
- John Gruber for original Markdown post.
- Macromates for TextMate.