summaryrefslogtreecommitdiff
path: root/inc/parser/handler.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2006-05-07 17:31:13 +0200
committerAndreas Gohr <andi@splitbrain.org>2006-05-07 17:31:13 +0200
commita4a2d4cf66dd68b9dc9ce51064fae2db8385d81d (patch)
treee17f8afdf47ce8fdd7e098c104ae6477d75fc497 /inc/parser/handler.php
parent3aee4c27813a30e720d3ad1fbcbd2e372a88573a (diff)
downloadrpg-a4a2d4cf66dd68b9dc9ce51064fae2db8385d81d.tar.gz
rpg-a4a2d4cf66dd68b9dc9ce51064fae2db8385d81d.tar.bz2
metadata hnalding updates, header fixes
This removes the meta instruction again in favour of the new meta renderer. Most tests work now again, a few tweaks were done on the header handler to render certain headers as it did in earlier versions. darcs-hash:20060507153113-7ad00-bd299fbe1762482c72d109f9bca776f12bcea7c8.gz
Diffstat (limited to 'inc/parser/handler.php')
-rw-r--r--inc/parser/handler.php12
1 files changed, 4 insertions, 8 deletions
diff --git a/inc/parser/handler.php b/inc/parser/handler.php
index 702bcce55..fde538515 100644
--- a/inc/parser/handler.php
+++ b/inc/parser/handler.php
@@ -9,10 +9,6 @@ class Doku_Handler {
var $calls = array();
- var $meta = array(
- 'first_heading' => '',
- );
-
var $status = array(
'section' => FALSE,
);
@@ -43,7 +39,6 @@ class Doku_Handler {
trigger_event('PARSER_HANDLER_DONE',$this);
array_unshift($this->calls,array('document_start',array(),0));
- array_unshift($this->calls,array('meta',array($this->meta),0));
$last_call = end($this->calls);
array_push($this->calls,array('document_end',array(),$last_call[2]));
}
@@ -87,9 +82,11 @@ class Doku_Handler {
function header($match, $state, $pos) {
// get level and title
- $level = 7 - strspn($match,'=');
+ $title = trim($match);
+ $level = 7 - strspn($title,'=');
if($level < 1) $level = 1;
- $title = trim($match,'= ');
+ $title = trim($title,'=');
+ $title = trim($title);
if ($this->status['section']) $this->_addCall('section_close',array(),$pos);
@@ -97,7 +94,6 @@ class Doku_Handler {
$this->_addCall('section_open',array($level),$pos);
$this->status['section'] = TRUE;
- if (!$this->meta['first_heading']) $this->meta['first_heading'] = $title;
return TRUE;
}