From 82d36e11cc7cf53f699730e5d5b97a83af5a95de Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Mon, 10 Aug 2015 13:22:16 +0200 Subject: [PATCH] doc: Replace whitespaces with - for section IDs Fixes jQuery selector issues when jumping to an anchor. --- modules/doc/library/Doc/DocSection.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/doc/library/Doc/DocSection.php b/modules/doc/library/Doc/DocSection.php index 4121fd69e..a8efc6fc3 100644 --- a/modules/doc/library/Doc/DocSection.php +++ b/modules/doc/library/Doc/DocSection.php @@ -88,6 +88,14 @@ class DocSection extends TreeNode return $this->content; } + /** + * {@inheritdoc} + */ + public function setId($id) + { + return parent::setId(str_replace(' ', '-', (string) $id)); + } + /** * Set the header level *