Update markdown rendering to use ParsedownExtra

This commit is contained in:
Ruben 2025-11-29 23:39:32 +01:00
parent 743c6bc236
commit f212e320cb

View file

@ -14,7 +14,10 @@ function renderContentFile(string $filePath): string {
if (!class_exists('Parsedown')) {
require_once __DIR__ . '/vendor/Parsedown.php';
}
$html = '<article>' . (new Parsedown())->text(file_get_contents($filePath)) . '</article>';
if (!class_exists('ParsedownExtra')) {
require_once __DIR__ . '/vendor/ParsedownExtra.php';
}
$html = '<article>' . (new ParsedownExtra())->text(file_get_contents($filePath)) . '</article>';
setCachedMarkdown($filePath, $html);
echo $html;
}