to avoid handling nowiki components by the script * Almost copied from DokuWiki units' function * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author HokkaidoPerson */ // must be run within Dokuwiki if(!defined('DOKU_INC')) die(); class syntax_plugin_wikistyle2html_nwtag extends DokuWiki_Syntax_Plugin { function getType(){ return 'substition'; } function getSort(){ return 169; // before Doku_Parser_Mode_unformatted } /** * Connect lookup pattern to lexer */ function connectTo($mode) { $this->Lexer->addEntryPattern('(?=.*)',$mode,'plugin_wikistyle2html_nwtag'); } function postConnect() { $this->Lexer->addExitPattern('','plugin_wikistyle2html_nwtag'); } /** * Handle the match */ function handle($match, $state, $pos, Doku_Handler $handler) { if ( $state == DOKU_LEXER_UNMATCHED ) { return array($match, $state); } } /** * Create output */ function render($format, Doku_Renderer $renderer, $data) { if ( $data[1] == DOKU_LEXER_UNMATCHED ) { $renderer->doc .= '' . hsc($data[0]) . ''; } } }