parent
55d3818ebb
commit
38a6df91b9
|
@ -150,12 +150,12 @@ class DocParser
|
||||||
$nofollow = false;
|
$nofollow = false;
|
||||||
}
|
}
|
||||||
if ($stack->isEmpty()) {
|
if ($stack->isEmpty()) {
|
||||||
$chapterName = $header;
|
$chapterTitle = $header;
|
||||||
$section = new Section($id, $header, $level, $nofollow, $chapterName);
|
$section = new Section($id, $header, $level, $nofollow, $chapterTitle);
|
||||||
$tree->addRoot($section);
|
$tree->addRoot($section);
|
||||||
} else {
|
} else {
|
||||||
$chapterName = $stack->bottom()->getTitle();
|
$chapterTitle = $stack->bottom()->getTitle();
|
||||||
$section = new Section($id, $header, $level, $nofollow, $chapterName);
|
$section = new Section($id, $header, $level, $nofollow, $chapterTitle);
|
||||||
$tree->addChild($section, $stack->top());
|
$tree->addChild($section, $stack->top());
|
||||||
}
|
}
|
||||||
$stack->push($section);
|
$stack->push($section);
|
||||||
|
|
Loading…
Reference in New Issue