Lexer->addSpecialPattern('\{\{anchor:[^}]*\}\}', $mode, 'plugin_anchor'); } function handle($match, $state, $pos, Doku_Handler $handler) { preg_match('/^\{\{anchor:([^:}]*)(?::([^}]*))?}}$/ui', $match, $result); return $result; } function render($mode, Doku_Renderer $renderer, $data) { $id = $data[1] ?? ''; $content = $data[2] ?? ''; if ($id == '') { $renderer->doc .= '