added parsedown for markdown
This commit is contained in:
parent
da82f93e99
commit
8c13989d47
@ -4,11 +4,13 @@
|
|||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<?php
|
<?php
|
||||||
|
$parsedown = new Parsedown();
|
||||||
|
$parsedown->setSafeMode(true);
|
||||||
|
|
||||||
foreach($notes as $n) {
|
foreach($notes as $n) {
|
||||||
echo '<div class="item-4-12">';
|
echo '<div class="item-4-12">';
|
||||||
echo '<h3>' . $n["title"] . '</h3>'
|
echo '<h3>' . $n["title"] . '</h3>'
|
||||||
. '<p>' . $n["content"] . '</p>';
|
. '<p>' . $parsedown->text($n['content'] ?? '') . '</p>';
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
session_start();
|
session_start();
|
||||||
|
|
||||||
|
require_once __DIR__ . '/Library/Parsedown.php';
|
||||||
|
|
||||||
spl_autoload_register(function ($className) {
|
spl_autoload_register(function ($className) {
|
||||||
if (substr($className, 0, 4) !== 'ppa\\') { return; }
|
if (substr($className, 0, 4) !== 'ppa\\') { return; }
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user