Corrected problem with md

This commit is contained in:
Romain de Laage 2020-03-08 13:54:29 +01:00
parent 63a8e21152
commit 043d774744
Signed by: rdelaage
GPG Key ID: 18BC11F1027B2AD4
2 changed files with 1 additions and 3 deletions

View File

@ -140,6 +140,4 @@ function countIndentation($string){
function md2html($text){
return convert(split($text));
}
echo md2html(file_get_contents("test.md"));
?>

View File

@ -9,7 +9,7 @@ if(isset($_GET["ID"])){
$authorName = getUserName($article["author"]);
$content = "<h1>".$article["title"]."</h1><article>".convert($article["content"])."</article><span>written by ".$authorName." on ".$article["date"]."</span>";
$content = "<h1>".$article["title"]."</h1><article>".md2html($article["content"])."</article><span>written by ".$authorName." on ".$article["date"]."</span>";
}else{
$content = "Article ID is empty";
}