Lines Matching refs:match

110      * get markup and depth from the match
112 * @param $match string
115 protected function interpret($match)
118 $depth = substr_count(str_replace("\t", ' ', ltrim($match,' ')),' ');
119 $match = trim($match);
124 if (preg_match('/^(-?\d+)([.:])/', $match, $matches)) {
131 $m += array('mk' => $match);
133 switch (substr($match, 0, 1)) {
139 if ($match == '+:') {
147 if ($match == '-:') $m += array('p' => 1);
151 if ($match == '*:') $m += array('p' => 1);
155 if ($match == ';') $m += array('class' => 'compact');
159 if ($match == '::') $m += array('p' => 1);
219 protected function _writeCall($tag, $attr, $state, $pos, $match, $handler)
222 array($state, $tag, $attr), $state, $pos, $match
230 private function _openList($m, $pos, $match, $handler)
251 $this->_writeCall($tag,$attr,DOKU_LEXER_ENTER, $pos,$match,$handler);
257 private function _closeList($m, $pos, $match, $handler)
263 $this->_writeCall($tag,'',DOKU_LEXER_EXIT, $pos,$match,$handler);
269 private function _openItem($m, $pos, $match, $handler)
287 $this->_writeCall($tag,$attr,DOKU_LEXER_ENTER, $pos,$match,$handler);
293 private function _closeItem($m, $pos, $match, $handler)
296 $this->_writeCall($tag,'',DOKU_LEXER_EXIT, $pos,$match,$handler);
302 private function _openWrapper($m, $pos, $match, $handler)
318 $this->_writeCall($tag,$attr,DOKU_LEXER_ENTER, $pos,$match,$handler);
324 private function _closeWrapper($m, $pos, $match, $handler)
340 $this->_writeCall($tag,'',DOKU_LEXER_EXIT, $pos,$match,$handler);
346 private function _openParagraph($pos, $match, $handler)
348 $this->_writeCall('p','',DOKU_LEXER_ENTER, $pos,$match,$handler);
354 private function _closeParagraph($pos, $match, $handler)
356 $this->_writeCall('p','',DOKU_LEXER_EXIT, $pos,$match,$handler);
360 * Handle the match
362 public function handle($match, $state, $pos, Doku_Handler $handler)
367 $this->storeListClass($match);
371 $m1 = $this->interpret($match);
377 $this->_openList($m1, $pos,$match,$handler);
379 $this->_openItem($m1, $pos,$match,$handler);
381 $this->_openWrapper($m1, $pos,$match,$handler);
383 if (isset($m1['p'])) $this->_openParagraph($pos,$match,$handler);
391 $handler->base($match, $state, $pos);
401 if (substr($match, -2) == '~~') {
402 $this->storeListClass($match);
408 $m1 = $this->interpret($match);
427 if (isset($m0['p'])) $this->_closeParagraph($pos,$match,$handler);
433 $this->_closeWrapper($m0, $pos,$match,$handler);
444 $this->_closeWrapper($m0, $pos,$match,$handler);
451 $this->_closeItem($m0, $pos,$match,$handler);
453 $this->_closeList($m0, $pos,$match,$handler);
465 $this->_openParagraph($pos,$match,$handler);
481 $this->_closeItem($m0, $pos,$match,$handler);
484 $this->_closeList($m0, $pos,$match,$handler);
492 $this->_openList($m1, $pos,$match,$handler);
498 $this->_openItem($m1, $pos,$match,$handler);
500 $this->_openWrapper($m1, $pos,$match,$handler);
502 if (isset($m1['p'])) $this->_openParagraph($pos,$match,$handler);