From 043d77474491e3bc677e23108ee4413fe6f6aa48 Mon Sep 17 00:00:00 2001 From: Romain de Laage Date: Sun, 8 Mar 2020 13:54:29 +0100 Subject: [PATCH] Corrected problem with md --- lib/md.php | 2 -- views/article.php | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/md.php b/lib/md.php index 12ee978..fa338bd 100644 --- a/lib/md.php +++ b/lib/md.php @@ -140,6 +140,4 @@ function countIndentation($string){ function md2html($text){ return convert(split($text)); } - -echo md2html(file_get_contents("test.md")); ?> diff --git a/views/article.php b/views/article.php index 2c474cb..4c73133 100644 --- a/views/article.php +++ b/views/article.php @@ -9,7 +9,7 @@ if(isset($_GET["ID"])){ $authorName = getUserName($article["author"]); - $content = "

".$article["title"]."

".convert($article["content"])."
written by ".$authorName." on ".$article["date"].""; + $content = "

".$article["title"]."

".md2html($article["content"])."
written by ".$authorName." on ".$article["date"].""; }else{ $content = "Article ID is empty"; }