'Gina Häußge, Michael Klier, Christopher Smith', 'email' => 'dokuwiki@chimeric.de', 'date' => '2015-08-30', 'name' => 'Creole Plugin (emptyline component)', 'desc' => 'Provide a notification if an empty line is detected.', 'url' => 'http://wiki.splitbrain.org/plugin:creole', ); } function getType() { return 'substition'; } function getPType() { return 'block'; } function getSort() { return 99; } function connectTo($mode) { $this->Lexer->addSpecialPattern( '\n(?=\n)', $mode, 'plugin_creole_emptyline' ); } /** * Constructor. */ public function __construct() { $this->eventhandler = plugin_load('helper', 'creole_eventhandler'); } function handle($match, $state, $pos, Doku_Handler $handler) { if ( $state == DOKU_LEXER_SPECIAL ) { $this->eventhandler->notifyEvent('found', 'emptyline', NULL, $pos, $match, $handler); return true; } return false; } function render($mode, Doku_Renderer $renderer, $data) { /*if($mode == 'xhtml') { if ($data) { if ( $this->getConf('linebreak') == 'Linebreak' ) { $renderer->doc .= "

"; } else { $renderer->doc .= " "; } } return true; }*/ return false; } } // vim:ts=4:sw=4:et:enc=utf-8: