# HG changeset patch # User Dan # Date 1248811671 14400 # Node ID 98ccd8815a028075d8488e3d5e3e88e958fad6d2 # Parent 88265c8715d07fb8d246b8378306ff80fc781aa9 Fixed a few tree construction + relative jump (1.1.7 parser) bugs in TOC diff -r 88265c8715d0 -r 98ccd8815a02 Wikulator.php --- a/Wikulator.php Fri May 29 14:32:47 2009 -0400 +++ b/Wikulator.php Tue Jul 28 16:07:51 2009 -0400 @@ -66,11 +66,12 @@ unset($treenum[count($treenum)-1]); } } + $treenum = array_values($treenum); if ( isset($treenum[count($treenum)-1]) ) $treenum[count($treenum)-1]++; if ( $i > 0 ) $toc .= ''; - $toc .= '
' . implode('.', $treenum) . ' ' . htmlspecialchars($matches[2][$i]) . ''; + $toc .= '
' . implode('.', $treenum) . ' ' . htmlspecialchars($matches[2][$i]) . ''; $prev = $head; } while ( $levels > 0 )