(?=.*?)'; public $pattern_end = ''; /* * What kind of syntax are we? */ function getType() {return 'container';} /* * Where to sort in? */ function getSort() {return 104;} /* * Paragraph Type */ function getPType(){return 'block';} public function getAllowedTypes() { return array('substition'); } public function connectTo($mode) { $this->Lexer->addEntryPattern($this->pattern_start,$mode,'plugin_imagelink_imagelink'); } public function postConnect() { $this->Lexer->addPattern("\{\{(?:[^\}]|(?:\}[^\}]))+\}\}",'plugin_imagelink_imagelink'); $this->Lexer->addExitPattern($this->pattern_end,'plugin_imagelink_imagelink'); } /* * Handle the matches */ public function handle($match, $state, $pos, Doku_Handler $handler){ $data = array(); $data['state'] = $state; switch($state) { case DOKU_LEXER_ENTER: $match = substr($match, 11,-1); // strip markup $flags = $this->parseFlags($match); $data['flags'] = $flags; break; case DOKU_LEXER_UNMATCHED: if (trim($match) !== '') { $handler->_addCall('cdata', array($match), $pos); } break; case DOKU_LEXER_EXIT: $this->first_item = false; break; } return $data; } /* * Create output */ function render($mode, Doku_Renderer $renderer, $data) { if($mode != 'xhtml') return false; if($data['state'] === DOKU_LEXER_ENTER) { $renderer->doc .= '