added parsedown for markdown

This commit is contained in:
Felix Ivo 2025-06-16 10:06:31 +02:00
parent da82f93e99
commit 8c13989d47
2 changed files with 5 additions and 1 deletions

View File

@ -4,11 +4,13 @@
<div class="container">
<?php
$parsedown = new Parsedown();
$parsedown->setSafeMode(true);
foreach($notes as $n) {
echo '<div class="item-4-12">';
echo '<h3>' . $n["title"] . '</h3>'
. '<p>' . $n["content"] . '</p>';
. '<p>' . $parsedown->text($n['content'] ?? '') . '</p>';
echo '</div>';
}
?>

View File

@ -2,6 +2,8 @@
session_start();
require_once __DIR__ . '/Library/Parsedown.php';
spl_autoload_register(function ($className) {
if (substr($className, 0, 4) !== 'ppa\\') { return; }