From af587fa822e0477bda4288e75b171f81ea8e68ce Mon Sep 17 00:00:00 2001 From: andi Date: Sun, 10 Apr 2005 19:59:16 +0200 Subject: new parser: code for section editing added darcs-hash:20050410175916-9977f-92bd9f70d66160b0f6188f42870d12b2e0964077.gz --- inc/parser/handler.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'inc/parser/handler.php') diff --git a/inc/parser/handler.php b/inc/parser/handler.php index 752ba49f7..72880736d 100644 --- a/inc/parser/handler.php +++ b/inc/parser/handler.php @@ -88,7 +88,7 @@ class Doku_Handler { $markerLen = strlen($iLevels[$level]); $title = substr($match, $markerLen, strlen($match)-($markerLen*2)); - $this->__addCall('header',array($title,$level), $pos); + $this->__addCall('header',array($title,$level,$pos), $pos); $this->meta['section'] = TRUE; return TRUE; } @@ -1353,9 +1353,11 @@ class Doku_Handler_Toc { var $numHeaders = 0; function process($calls) { + #FIXME can this be done better? + global $conf; foreach ( $calls as $call ) { - if ( $call[0] == 'header' && $call[1][1] < 4 ) { + if ( $call[0] == 'header' && $call[1][1] <= $conf['maxtoclevel'] ) { $this->numHeaders++; $this->addToToc($call); } -- cgit v1.2.3