mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2024-12-22 04:40:20 +01:00
Added anchors to FAQ
This commit is contained in:
parent
640bd36b86
commit
863140c1ca
@ -14,7 +14,7 @@
|
|||||||
foreach (new DirectoryIterator("./") as $file){
|
foreach (new DirectoryIterator("./") as $file){
|
||||||
if (!$file->isDot() && !$file->isDir() && $file->getExtension() === "md"){
|
if (!$file->isDot() && !$file->isDir() && $file->getExtension() === "md"){
|
||||||
$markdown = $parser->parse(file_get_contents($file->getPathname()));
|
$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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user