*/ class syntax_plugin_bbcode_italic extends SyntaxPlugin { /** @inheritdoc */ public function getType() { return 'formatting'; } /** @inheritdoc */ public function getAllowedTypes() { return ['formatting', 'substition', 'disabled']; } /** @inheritdoc */ public function getSort() { return 105; } /** @inheritdoc */ public function connectTo($mode) { $this->Lexer->addEntryPattern('\[i\](?=.*?\x5B/i\x5D)', $mode, 'emphasis'); } /** @inheritdoc */ public function postConnect() { $this->Lexer->addExitPattern('\[/i\]', 'emphasis'); } /** @inheritdoc */ public function handle($match, $state, $pos, Handler $handler) { return []; } /** @inheritdoc */ public function render($format, Doku_Renderer $renderer, $data) { return true; } }