summaryrefslogtreecommitdiff
path: root/inc/parser/handler.php
diff options
context:
space:
mode:
authorandi <andi@splitbrain.org>2005-04-10 19:59:16 +0200
committerandi <andi@splitbrain.org>2005-04-10 19:59:16 +0200
commitaf587fa822e0477bda4288e75b171f81ea8e68ce (patch)
treed777c6f76b1127fd055dc2995e0782a20cc23cea /inc/parser/handler.php
parent4de671bc5e749ac76ad85252df59feb45c749eab (diff)
downloadrpg-af587fa822e0477bda4288e75b171f81ea8e68ce.tar.gz
rpg-af587fa822e0477bda4288e75b171f81ea8e68ce.tar.bz2
new parser: code for section editing added
darcs-hash:20050410175916-9977f-92bd9f70d66160b0f6188f42870d12b2e0964077.gz
Diffstat (limited to 'inc/parser/handler.php')
-rw-r--r--inc/parser/handler.php6
1 files changed, 4 insertions, 2 deletions
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);
}