type = 'bq'; $this->regexp = "/^(\>+)(.*)/"; } function open() { $this->_previousTag = $this->_detectMatch[1]; $this->_firstTagLen = strlen($this->_previousTag); $this->_firstLine = true; return str_repeat('
',$this->_firstTagLen).'',strlen($this->_previousTag)); } function getRenderedLine() { $d=strlen($this->_previousTag) - strlen($this->_detectMatch[1]); $str=''; if( $d > 0 ){ // on remonte d'un cran dans la hierarchie... $str=''.str_repeat('',$d).''; } function close() { return '
'.str_repeat('
'; $this->_previousTag=$this->_detectMatch[1]; } elseif( $d < 0 ) { // un niveau de plus $this->_previousTag=$this->_detectMatch[1]; $str='
'.str_repeat('',-$d).''; } else { if($this->_firstLine) $this->_firstLine=false; else $str='
'; } return $str.$this->_renderInlineTag($this->_detectMatch[2]); } }