Lexer->addSpecialPattern('\{\{infobox>.*?\}\}', $mode, 'plugin_infobox'); } public function handle($match, $state, $pos, Doku_Handler $handler) { $data = substr($match, 10, -2); $lines = explode("\n", $data); $params = []; foreach ($lines as $line) { $line = trim($line); if (strpos($line, '=') !== false) { list($key, $value) = explode('=', $line, 2); $params[trim($key)] = trim($value); } } return $params; } public function render($mode, Doku_Renderer $renderer, $data) { if ($mode != 'xhtml') return false; $renderer->doc .= '
| ' . hsc($key) . ' | ' . $this->_parseWikiText($value) . ' |
|---|