Added anchors to FAQ

This commit is contained in:
kkapsner 2022-01-30 11:00:00 +01:00
parent 640bd36b86
commit 863140c1ca
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@
foreach (new DirectoryIterator("./") as $file){
if (!$file->isDot() && !$file->isDir() && $file->getExtension() === "md"){
$markdown = $parser->parse(file_get_contents($file->getPathname()));
echo $markdown->view("html");
echo preg_replace("/<h2/", "<h2 id=\"" . str_replace(".md", "", $file->getFilename()) . "\"", $markdown->view("html"), 1);
}
}
?>