Extension:MarkdownSyntax

MarkdownSyntax is a MediaWiki extension that enables markdown syntax. Markdown is a text-to-HTML conversion tool for web writers. Markdown allows you to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HTML).

Installation

 * 1) Create a folder in your $IP/extensions directory called MarkdownSyntax.
 * Note: $IP is your MediaWiki install dir.
 * You have something like this: $IP/extensions/MarkdownSyntax/
 * 1) Download ExtendedSyntaxParser, be sure to rename the downloaded file to ExtendedSyntaxParser.php.
 * 2) Drop ExtendedSyntaxParser.php into $IP/extensions/MarkdownSyntax/
 * 3) Download Michel Fortin's PHP Markdown, unzip and look for the file markdown.php.
 * Note: Don't download PHP Markdown Extra. Only PHP Markdown is supported. PHP Markdown Extra may be supported in a future release
 * 1) Drop markdown.php</tt> into $IP/extensions/MarkdownSyntax/</tt>
 * 2) Download MarkdownSyntax.php</tt> and drop it into $IP/extensions/MarkdownSyntax/</tt> also.
 * 3) Enable the extension by adding these two lines to your LocalSettings.php</tt>: require_once( "{$IP}/extensions/MarkdownSyntax/ExtendedSyntaxParser.php" );  require_once( "{$IP}/extensions/MarkdownSyntax/MarkdownSyntax.php" );

Developer notes

 * Thanks to Ian Smith for his suggestion to use UsenetSyntax as a model for this extension. This is the path I took. It requires the ExtendedSyntaxParser. Thanks to Jim R. Wilson (Jimbojw) for writing UsenetSyntax and ExtendedSyntaxParser.


 * As an alternative to using ExtendedSyntaxParser, I considered using InternalParseBeforeLinks. I may try that approach in the future. It says here that the InternalParseBeforeLinks hook should be... "Used to process the expanded wiki code after &lt;nowiki>, HTML-comments, and templates have been treated. Suitable for syntax extensions that want to support templates and comments." That sounds like what we need.

Bugs

 * Blockquotes aren't working.
 * html isn't working
 * If you see any bugs, please document them here.

More Testing Needed
To help look for bugs, we need to write some good tests and document them. This page is a good starting point. I've gotten sections of it to render properly.

Incompatibilities
ExtendedSyntaxParser is "not amicable to running along side certain other kinds of extensions". Here are a list of extensions it doesn't work with:
 * TabbedData_extension.

MarkdownSyntax.php
<?php // ?>