1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-11-25 05:22:59 +00:00

parser: add id to automatic table of contents heading

This commit is contained in:
Starbeamrainbowlabs 2020-05-23 23:00:46 +01:00
parent d99587079f
commit 6c11ef4957
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -1319,7 +1319,7 @@ class PeppermintParsedown extends ParsedownExtra
if($settings->parser_toc_heading_level > 1)
array_unshift(
$elements,
[ "name" => "h$settings->parser_toc_heading_level", "text" => "Table of Contents" ]
[ "name" => "h$settings->parser_toc_heading_level", "text" => "Table of Contents", "attributes" => [ "id" => "table-of-contents" ] ]
);
return trim($this->elements($elements), "\n");