@@ -51,14 +51,20 @@ |
||
51 | 51 | |
52 | 52 | $headingID = $heading->attributes['id']; |
53 | 53 | |
54 | - if ($curr > $last) // If the current level is greater than the last level indent one level |
|
54 | + if ($curr > $last) |
|
55 | + { |
|
56 | + // If the current level is greater than the last level indent one level |
|
55 | 57 | { |
56 | 58 | $toc .= '<ul>'; |
57 | 59 | } |
58 | - elseif ($curr < $last) // If the current level is less than the last level go up appropriate amount. |
|
60 | + } |
|
61 | + elseif ($curr < $last) |
|
62 | + { |
|
63 | + // If the current level is less than the last level go up appropriate amount. |
|
59 | 64 | { |
60 | 65 | $toc .= str_repeat('</li></ul>', $last - $curr) . '</li>'; |
61 | 66 | } |
67 | + } |
|
62 | 68 | else // If the current level is equal to the last. |
63 | 69 | { |
64 | 70 | $toc .= '</li>'; |