2 require_once("library/parsedown/Parsedown.php");
4 function Markdown($text) {
6 // Bugfix for the library:
7 // "[Title](http://domain.tld/ )" isn't handled correctly
8 $text = preg_replace("/\[(.*?)\]\s*?\(\s*?(\S*?)\s*?\)/ism", '[$1]($2)', $text);
10 $Parsedown = new Parsedown();
11 return($Parsedown->text($text));