setMarkupEscaped(true); $Extra = new ParsedownExtra(); $article = $_GET['article'] ?? ''; $article = basename($article); $path = __DIR__ . "/source/{$article}.md"; if (!is_file($path)) { http_response_code(404); exit; } $raw = file_get_contents($path); $title = preg_match("/^title:\s*(.*)$/mi", $raw, $m) ? trim($m[1]) : ucfirst($article); $authors = preg_match("/^authors:\s*(.*)$/mi", $raw, $m) ? trim($m[1]) : ucfirst($article); $body = preg_replace("/^(title|category|authors):[^\r\n]*\r?\n/m", "", $raw); $html = $Extra->text($body); ?>
osoby autorskie: >~