|
CompilersMarkdown
The shipped compiler for Markdown syntax
Markdown CompilerThis is the compiler for the well-known and well-proven Markdown syntax which is very similar to many wiki syntaxes. For a description of the syntax take a look at the PHP Markdown page at http://michelf.com/projects/php-markdown/. There you get also the newest "markdown.php" file you need to use this compiler. Configuration Parameterspath (string "") Define here the path to the "markdown.php" file. config (array) This array has to be an associative array. Every key will be used to set a member of the Markdown class. Eg if you want to disallow html markup in the template set the key "no_markup" with the boolean value "true" mappings (array) Defines shortcut mappings for a given function string. The array has to be an associative one where the key is a regular expression pattern which will be replaced by the given value. Config Example$serpent->addPluginConfig('compiler', 'markdown', array(
'path' => dirname(__FILE__).'/external/php-markdown-extra-1.2.3/markdown.php',
'mappings' => array(
'=\[>sqrt:(\d+)\]=' => '<?php echo sqrt($1); ?>'
),
'config' => array(
'no_markup' => true
),
));
|
Sign in to add a comment