From 6c11ef49570ed9bd4d9025458328e65f72c6a86c Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Sat, 23 May 2020 23:00:46 +0100 Subject: [PATCH] parser: add id to automatic table of contents heading --- modules/parser-parsedown.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/parser-parsedown.php b/modules/parser-parsedown.php index 98c55df..16f6e09 100644 --- a/modules/parser-parsedown.php +++ b/modules/parser-parsedown.php @@ -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");