summaryrefslogtreecommitdiff
path: root/inc/parser/lexer.php
diff options
context:
space:
mode:
authorandi <andi@splitbrain.org>2005-05-19 22:10:09 +0200
committerandi <andi@splitbrain.org>2005-05-19 22:10:09 +0200
commitee20e7d16637625e900f518b6b46a61bfa30fe6e (patch)
treef621ec424429d9dc9732a059ec0ca4bf83aab566 /inc/parser/lexer.php
parent64f50cdbe21d0b9ca2165749301e6f553f9b8f02 (diff)
downloadrpg-ee20e7d16637625e900f518b6b46a61bfa30fe6e.tar.gz
rpg-ee20e7d16637625e900f518b6b46a61bfa30fe6e.tar.bz2
first attempt of syntax plugins
The first version of the new plugin system. Syntax plugins only yet. A very simple example plugin called info (doing nothig useful yet) is included. Missing Features - Doku_Block_Handler needs work (doesn't honur plugins yet) - there is no way to specify the order of plugins and other modes yet - useful output from the info plugin - bug testing and fixing - code cleanup - documentation darcs-hash:20050519201009-9977f-f793dbfc6a39d8a9643b610927d93cd3288bdd6b.gz
Diffstat (limited to 'inc/parser/lexer.php')
-rw-r--r--inc/parser/lexer.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/inc/parser/lexer.php b/inc/parser/lexer.php
index e7961932d..1cacaeed5 100644
--- a/inc/parser/lexer.php
+++ b/inc/parser/lexer.php
@@ -471,6 +471,13 @@ class Doku_Lexer {
if (isset($this->_mode_handlers[$handler])) {
$handler = $this->_mode_handlers[$handler];
}
+ // modes starting with plugin_ are all handled by the same
+ // handler but with an additional parameter
+ if(substr($handler,0,7)=='plugin_'){
+ list($handler,$plugin) = split('_',$handler,2);
+ return $this->_parser->$handler($content, $is_match, $pos, $plugin);
+ }
+
return $this->_parser->$handler($content, $is_match, $pos);
}