mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-01 11:04:24 +02:00
parent
370bfca6e6
commit
ed8de18ad5
@ -72,6 +72,7 @@ class DocParser
|
|||||||
throw new DocException('Couldn\'t get the lock');
|
throw new DocException('Couldn\'t get the lock');
|
||||||
}
|
}
|
||||||
$line = null;
|
$line = null;
|
||||||
|
$sectionTitle = null;
|
||||||
while (! $fileObject->eof()) {
|
while (! $fileObject->eof()) {
|
||||||
// Save last line for setext-style headers
|
// Save last line for setext-style headers
|
||||||
$lastLine = $line;
|
$lastLine = $line;
|
||||||
@ -79,6 +80,10 @@ class DocParser
|
|||||||
$header = $this->extractHeader($line, $lastLine);
|
$header = $this->extractHeader($line, $lastLine);
|
||||||
if ($header !== null) {
|
if ($header !== null) {
|
||||||
list($header, $level) = $header;
|
list($header, $level) = $header;
|
||||||
|
if ($sectionTitle === null) {
|
||||||
|
// The first header is the section's title
|
||||||
|
$sectionTitle = $header;
|
||||||
|
}
|
||||||
$id = $this->extractHeaderId($header);
|
$id = $this->extractHeaderId($header);
|
||||||
$nofollow = false;
|
$nofollow = false;
|
||||||
$this->reduceToc($tocStack, $level);
|
$this->reduceToc($tocStack, $level);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user