Update markdown rendering to use ParsedownExtra
This commit is contained in:
parent
743c6bc236
commit
f212e320cb
1 changed files with 4 additions and 1 deletions
|
|
@ -14,7 +14,10 @@ function renderContentFile(string $filePath): string {
|
||||||
if (!class_exists('Parsedown')) {
|
if (!class_exists('Parsedown')) {
|
||||||
require_once __DIR__ . '/vendor/Parsedown.php';
|
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);
|
setCachedMarkdown($filePath, $html);
|
||||||
echo $html;
|
echo $html;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue