1
0
Fork 0

Merge pull request #8159 from MrPetovan/bug/help-toc-loop-de-loop

Remove duplicated TOC loop in Module\Help
This commit is contained in:
Tobias Diekershoff 2020-01-23 15:31:34 +01:00 committed by GitHub
commit 9475383c4f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -66,7 +66,6 @@ class Help extends BaseModule
$idNum = [0, 0, 0, 0, 0, 0, 0];
foreach ($lines as &$line) {
$matches = [];
foreach ($lines as &$line) {
if (preg_match('#<h([1-6])>([^<]+?)</h\1>#i', $line, $matches)) {
$level = $matches[1];
$anchor = urlencode($matches[2]);
@ -95,7 +94,6 @@ class Help extends BaseModule
$lastLevel = $level;
}
}
}
for ($k = 0; $k < $lastLevel; $k++) {
$toc .= "</ul>";