]> git.mxchange.org Git - friendica.git/blob - library/markdown.php
Merge remote-tracking branch 'upstream/develop' into 1502-improved-markdown
[friendica.git] / library / markdown.php
1 <?php
2 //# Install PSR-0-compatible class autoloader
3 //spl_autoload_register(function($class){
4 //      require preg_replace('{\\\\|_(?!.*\\\\)}', DIRECTORY_SEPARATOR, ltrim($class, '\\')).'.php';
5 //});
6
7 require_once("library/php-markdown/Michelf/MarkdownExtra.inc.php");
8 # Get Markdown class
9 use \Michelf\MarkdownExtra;
10
11 function Markdown($text) {
12         # Read file and pass content through the Markdown parser
13         $html = MarkdownExtra::defaultTransform($text);
14
15         return $html;
16 }
17 ?>