From 2bb0d5419919bf72dd2338b331ea1a4c40ec6cbc Mon Sep 17 00:00:00 2001 From: chris <chris@jalakai.co.uk> Date: Sun, 5 Aug 2007 18:38:33 +0200 Subject: [PATCH] minor fixes for recent tpl_toc() patch darcs-hash:20070805163833-9b6ab-82e8cd7ec37d163ccb552e3b6aee8c1f70e75f15.gz --- inc/html.php | 2 +- inc/parser/xhtml.php | 2 +- inc/template.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/inc/html.php b/inc/html.php index 58886dce5..3ae192c73 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1292,7 +1292,7 @@ function html_mktocitem($link, $text, $level, $hash='#'){ return array( 'link' => $hash.$link, 'title' => $text, 'type' => 'ul', - 'level' => $level-$conf['toptoclevel']+1); + 'level' => $level); } /** diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index e22298fa3..aba44e8da 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -97,7 +97,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { //handle TOC if($level >= $conf['toptoclevel'] && $level <= $conf['maxtoclevel']){ - $this->toc[] = html_mktocitem("#$id", $text, $level); + $this->toc[] = html_mktocitem("#$id", $text, $level-$conf['toptoclevel']+1); } } diff --git a/inc/template.php b/inc/template.php index 196aedb4b..1d812cab3 100644 --- a/inc/template.php +++ b/inc/template.php @@ -158,7 +158,7 @@ function tpl_toc($return=false){ if(isset($meta['internal']['toc'])){ $tocok = $meta['internal']['toc']; }else{ - $tokok = true; + $tocok = true; } $toc = $meta['description']['tableofcontents']; if(!$tocok || !is_array($toc) || count($toc) < 3){ -- GitLab