mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 07:44:04 +02:00
parent
85c477e577
commit
4a002af0b9
@ -245,10 +245,18 @@ class DocSectionRenderer extends DocRenderer
|
|||||||
} else {
|
} else {
|
||||||
$title = $this->getView()->escape($title);
|
$title = $this->getView()->escape($title);
|
||||||
}
|
}
|
||||||
|
$number = '';
|
||||||
|
for ($i = 0; $i < $this->getDepth() + 1; ++$i) {
|
||||||
|
if ($i > 0) {
|
||||||
|
$number .= '.';
|
||||||
|
}
|
||||||
|
$number .= $this->getSubIterator($i)->key() + 1;
|
||||||
|
}
|
||||||
$this->content[] = sprintf(
|
$this->content[] = sprintf(
|
||||||
'<a name="%1$s"></a><h%2$d>%3$s</h%2$d>',
|
'<a name="%1$s"></a><h%2$d>%3$s. %4$s</h%2$d>',
|
||||||
static::encodeAnchor($section->getId()),
|
static::encodeAnchor($section->getId()),
|
||||||
$section->getLevel(),
|
$section->getLevel(),
|
||||||
|
$number,
|
||||||
$title
|
$title
|
||||||
);
|
);
|
||||||
$html = $this->parsedown->text(implode('', $section->getContent()));
|
$html = $this->parsedown->text(implode('', $section->getContent()));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user