Corrected problem with md

master
Romain de Laage 3 years ago
parent 63a8e21152
commit 043d774744
Signed by: rdelaage
GPG Key ID: 18BC11F1027B2AD4

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

@ -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";
}