Lexer->addSpecialPattern('{{[^{}]*\.[pjg][npi][gf][^{}]*}}', $mode, 'plugin_bootstyle'); } function handle($match, $state, $pos, Doku_Handler $handler){ echo "handle"; exit(); if ($state != DOKU_LEXER_SPECIAL) return array(); // $match will equal our full matching pattern, need to pull the image and size out if (preg_match('/{{(.*\.[pjg][npi][gf])\??([0-9]*)x?([0-9]*)\|?(.*)}}/', html_entity_decode($match), $parts)) { if (! $parts[2]) { $parts[2] = 150; $parts[3] = 150; } return $parts; } return array(); } /** * Create output */ function render($mode, Doku_Renderer $renderer, $data) { echo "render"; exit(); if ($mode == 'xhtml' or $mode == 'htmldoc') { list($all, $src, $width, $height, $title) = $data; if (! preg_match('/^https?:/', $src)) { $src = DOKU_BASE . "lib/exe/fetch.php?media=$src"; } $renderer->doc .= "\"$title\""; return true; } return false; } }