*/ 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'); class syntax_plugin_nocode extends DokuWiki_Syntax_Plugin { /** * return some info */ function getInfo(){ return array( 'email' => 'fhaefner@informatik.tu-cottbus.de', 'date' => '2010-06-02', 'name' => 'Remove Indentation for Code', 'desc' => 'Remove Indentation for Code', 'url' => 'http://studiy.tu-cottbus.de/', ); } function getType(){ return 'substition';} function getPType(){ return 'normal';} function getSort(){ return 19; } function connectTo($mode) { // Has hard coded awareness of lists... $this->Lexer->addSpecialPattern('\n (?![\*\-])',$mode,'plugin_nocode'); $this->Lexer->addSpecialPattern('\n\t(?![\*\-])',$mode,'plugin_nocode'); } function handle($match, $state, $pos, &$handler) { // do nothing return true; } function render($mode, &$renderer, $data) { // do nothing again return; } }