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