2011-04-11 08:59:26 -04:00
|
|
|
<?php
|
2015-02-23 02:27:35 -05:00
|
|
|
//# Install PSR-0-compatible class autoloader
|
|
|
|
//spl_autoload_register(function($class){
|
|
|
|
// require preg_replace('{\\\\|_(?!.*\\\\)}', DIRECTORY_SEPARATOR, ltrim($class, '\\')).'.php';
|
|
|
|
//});
|
2011-04-11 08:59:26 -04:00
|
|
|
|
2015-02-23 02:27:35 -05:00
|
|
|
require_once("library/php-markdown/Michelf/MarkdownExtra.inc.php");
|
|
|
|
# Get Markdown class
|
|
|
|
use \Michelf\MarkdownExtra;
|
2015-02-22 14:06:13 -05:00
|
|
|
|
2015-02-23 02:27:35 -05:00
|
|
|
function Markdown($text) {
|
|
|
|
# Read file and pass content through the Markdown parser
|
|
|
|
$html = MarkdownExtra::defaultTransform($text);
|
2015-02-22 14:06:13 -05:00
|
|
|
|
2015-02-23 02:27:35 -05:00
|
|
|
return $html;
|
2011-04-11 08:59:26 -04:00
|
|
|
}
|
2015-02-22 11:38:28 -05:00
|
|
|
?>
|