From ee20e7d16637625e900f518b6b46a61bfa30fe6e Mon Sep 17 00:00:00 2001 From: andi Date: Thu, 19 May 2005 22:10:09 +0200 Subject: 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 --- inc/parser/xhtml.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'inc/parser/xhtml.php') diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index f9f6be1e6..b58c24435 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -19,6 +19,7 @@ if ( !defined('DOKU_TAB') ) { } require_once DOKU_INC . 'inc/parser/renderer.php'; +require_once DOKU_INC . 'inc/pluginutils.php'; /** * The Renderer @@ -41,7 +42,6 @@ class Doku_Renderer_xhtml extends Doku_Renderer { var $store = ''; - function document_start() { } @@ -57,6 +57,14 @@ class Doku_Renderer_xhtml extends Doku_Renderer { $this->doc .= ''.DOKU_LF; } } + + //handles plugin rendering + function plugin($name,$data){ + $plugin = null; + if(plugin_load('syntax',$name,$plugin)){ + $plugin->render('xhtml',$this,$data); + } + } function toc_open() { global $lang; -- cgit v1.2.3