2011-04-11 12:59:26 +00:00
|
|
|
<?php
|
2017-03-25 06:03:47 +00:00
|
|
|
require_once "library/php-markdown/Michelf/MarkdownExtra.inc.php";
|
2015-02-23 07:27:35 +00:00
|
|
|
use \Michelf\MarkdownExtra;
|
2015-02-22 19:06:13 +00:00
|
|
|
|
2015-02-23 07:27:35 +00:00
|
|
|
function Markdown($text) {
|
2015-02-23 23:08:17 +00:00
|
|
|
$a = get_app();
|
|
|
|
|
|
|
|
$stamp1 = microtime(true);
|
|
|
|
|
2017-03-24 01:23:00 +00:00
|
|
|
$MarkdownParser = new MarkdownExtra();
|
|
|
|
$MarkdownParser->hard_wrap = true;
|
|
|
|
$html = $MarkdownParser->transform($text);
|
2015-02-22 19:06:13 +00:00
|
|
|
|
2015-02-24 09:21:09 +00:00
|
|
|
$a->save_timestamp($stamp1, "parser");
|
2015-02-23 23:08:17 +00:00
|
|
|
|
2015-02-23 07:27:35 +00:00
|
|
|
return $html;
|
2011-04-11 12:59:26 +00:00
|
|
|
}
|