* * 2010/05/19 : Creation */ if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../').'/'); if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); require_once(DOKU_PLUGIN.'syntax.php'); /** * All DokuWiki plugins to extend the parser/rendering mechanism * need to inherit from this class */ class syntax_plugin_dokugource extends DokuWiki_Syntax_Plugin { // return some info function getInfo() { return confToHash(dirname(__FILE__).'/INFO'); } function accepts($m) { return true;} function getType() { return 'substition';} function getPType() { return 'normal';} function getSort() { return 5; } // Connect pattern to lexer function connectTo($mode){ $this->Lexer->addSpecialPattern('(?i)~~gourcecolor[<:>].+?~~', $mode, 'plugin_dokugource'); } // Handle the match function handle($match, $state, $pos, &$handler) { return array(); } /** * Create output */ function render($mode, &$renderer, $data) { return true; } } //class ?>