]> git.mxchange.org Git - friendica.git/blob - library/markdown.php
DB Version was forgotten ...
[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
13         $a = get_app();
14
15         $stamp1 = microtime(true);
16
17         # Read file and pass content through the Markdown parser
18         $html = MarkdownExtra::defaultTransform($text);
19
20         $a->save_timestamp($stamp1, "parser");
21
22         return $html;
23 }
24 ?>