1
0
Fork 0

Bugfix for spaces in links

This commit is contained in:
Michael Vogel 2015-02-22 20:06:13 +01:00
commit 4a6a6ca937
2 changed files with 6 additions and 1 deletions

View file

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