* changes in an incompatible way, so the parser cache
* can automatically discard old data.
*/
- const VERSION = '1.6.2';
+ const VERSION = '1.6.4';
# Flags for Parser::setFunctionHook
# Also available as global constants from Defines.php
$prevlevel = 0;
$toclevel = 0;
$prevtoclevel = 0;
+ $rawtoc = array();
foreach( $matches[3] as $headline ) {
$istemplate = 0;
}
if( $enoughToc && ( !isset($wgMaxTocLevel) || $toclevel<$wgMaxTocLevel ) ) {
$toc .= $sk->tocLine($anchor, $tocline, $numbering, $toclevel);
+ $tocraw[] = array( 'toclevel' => $toclevel, 'level' => $level, 'line' => $tocline, 'number' => $numbering );
}
# give headline the correct <h#> tag
if( $showEditLink && ( !$istemplate || $templatetitle !== "" ) ) {
$sectionCount++;
}
+ $this->mOutput->setSections( $tocraw );
+
# Never ever show TOC if no headers
if( $numVisible < 1 ) {
$enoughToc = false;