Lexer->addEntryPattern(')', $mode, 'code'); } /** @inheritdoc */ public function postConnect() { $this->Lexer->addExitPattern('', 'code'); } /** @inheritdoc */ public function handle($match, $state, $pos, Handler $handler) { if ($state !== DOKU_LEXER_UNMATCHED) return true; // split "language filename [options]>content" at the first > [$attr, $content] = sexplode('>', $match, 2, ''); [$language, $filename, $options] = Helpers::parseCodeAttributes($attr); $param = [$content, $language, $filename]; if ($options !== null) $param[] = $options; $handler->addCall($this->type, $param, $pos); return true; } }