\s*
#','',$this->doc); } function toc_additem($id, $text, $level) { global $conf; //handle TOC if($level >= $conf['toptoclevel'] && $level <= $conf['maxtoclevel']){ $this->toc[] = html_mktocitem($id, $text, $level-$conf['toptoclevel']+1); } } function header($text, $level, $pos) { if(!$text) return; //skip empty headlines $hid = $this->_headerToLink($text,true); //only add items within configured levels $this->toc_additem($hid, $text, $level); // adjust $node to reflect hierarchy of levels $this->node[$level-1]++; if ($level < $this->lastlevel) { for ($i = 0; $i < $this->lastlevel-$level; $i++) { $this->node[$this->lastlevel-$i-1] = 0; } } $this->lastlevel = $level; // write the header $this->doc .= DOKU_LF.''.DOKU_LF; } function p_close() { $this->doc .= DOKU_LF.'
'.DOKU_LF; } function linebreak() { $this->doc .= '';
}
function monospace_close() {
$this->doc .= '
';
}
function subscript_open() {
$this->doc .= '';
}
function subscript_close() {
$this->doc .= '';
}
function superscript_open() {
$this->doc .= '';
}
function superscript_close() {
$this->doc .= '';
}
function deleted_open() {
$this->doc .= ''.DOKU_LF; } function preformatted($text) { $this->doc .= ''.DOKU_LF; } function quote_close() { $this->doc .= '
' . trim($this->_xmlEntities($text),"\n\r") . ''. DOKU_LF; } function file($text, $language=null, $filename=null) { $this->_highlight('file',$text,$language,$filename); } function code($text, $language=null, $filename=null) { $this->_highlight('code',$text,$language,$filename); } /** * Use GeSHi to highlight language syntax in code and file blocks * * @author Andreas Gohr
'.$this->_xmlEntities($text).''.DOKU_LF; } else { $class = 'code'; //we always need the code class to make the syntax highlighting apply if($type != 'code') $class .= ' '.$type; $this->doc .= "
".p_xhtml_cached_geshi($text, $language, '').''.DOKU_LF; } if($filename){ $this->doc .= '