summaryrefslogtreecommitdiff
path: root/inc/parser/handler.php
diff options
context:
space:
mode:
authorandi <andi@splitbrain.org>2005-07-04 20:49:55 +0200
committerandi <andi@splitbrain.org>2005-07-04 20:49:55 +0200
commit0c16b1d365abfa99863514dfab095daed951aec5 (patch)
tree9de6cde67f27df3a5f44d31ddf1d0b59742ddc6f /inc/parser/handler.php
parent9ec7f4281238a64ba975c13a4dd3a26f66b1b265 (diff)
downloadrpg-0c16b1d365abfa99863514dfab095daed951aec5.tar.gz
rpg-0c16b1d365abfa99863514dfab095daed951aec5.tar.bz2
relaxed header handling #441
The header handler now doesn't care for the number of closing header markers. The following lines are all detected as h2 headers: darcs-hash:20050704184955-9977f-bcf18ece3b66b48638aeb5588613c0283eda4584.gz
Diffstat (limited to 'inc/parser/handler.php')
-rw-r--r--inc/parser/handler.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/inc/parser/handler.php b/inc/parser/handler.php
index 9865ab526..3ba3d654e 100644
--- a/inc/parser/handler.php
+++ b/inc/parser/handler.php
@@ -103,10 +103,8 @@ class Doku_Handler {
$level = 1;
}
- // Strip of the marker for the header, based on the level - the rest is the title
- $iLevels = array_flip($levels);
- $markerLen = strlen($iLevels[$level]);
- $title = substr($match, $markerLen, strlen($match)-($markerLen*2));
+ // Strip markers and whitespaces
+ $title = trim($match,'= ');
$this->_addCall('header',array($title,$level,$pos), $pos);
$this->meta['section'] = TRUE;