Browse Source

Corrected problem with md

master
Romain de Laage 2 years ago
parent
commit
043d774744
Signed by: rdelaage
GPG Key ID: 18BC11F1027B2AD4
  1. 2
      lib/md.php
  2. 2
      views/article.php

2
lib/md.php

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

2
views/article.php

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