Lexer->addEntryPattern('(?=.*?)',$mode,'plugin_subnumberlist');
}
public function postConnect() {
$this->Lexer->addExitPattern('','plugin_subnumberlist');
}
/**
* Handle the match
*/
public function handle($match, $state, $pos, Doku_Handler $handler){
switch ($state) {
case DOKU_LEXER_ENTER:
return array($state, $match);
case DOKU_LEXER_UNMATCHED :
return array($state, $match);
case DOKU_LEXER_EXIT :
return array($state, '');
}
return false;
}
public function render($mode, Doku_Renderer $renderer, $indata) {
if($mode == 'xhtml') {
list($state, $match) = $indata;
switch ($state) {
case DOKU_LEXER_ENTER :
$renderer->doc .= '
';
break;
case DOKU_LEXER_UNMATCHED :
$renderer->doc .= $renderer->_xmlEntities($match);
break;
case DOKU_LEXER_EXIT :
$renderer->doc .= '
';
break;
}
return true;
}
return false;
}
}
//Setup VIM: ex: et ts=4 enc=utf-8 :
?>