=38) return false; return ($format=='xhtml'); } /** * $sectionedits is private and cannot be accessed by plugins, * so this dirty hack is required * * Get rid of this renderer if it's fixed... */ public $sectionedits = array(); // A stack of section edit data /** * Copied from xhtml.php, no change */ public function startSectionEdit($start, $type, $title = null) { static $lastsecid = 0; $this->sectionedits[] = array(++$lastsecid, $start, $type, $title); return 'sectionedit' . $lastsecid; } public function finishSectionEdit($end = null) { list($id, $start, $type, $title) = array_pop($this->sectionedits); if (!is_null($end) && $end <= $start) { return; } $this->doc .= "'; } function document_end() { // Finish open section edits. while (count($this->sectionedits) > 0) { if ($this->sectionedits[count($this->sectionedits) - 1][1] <= 1) { // If there is only one section, do not write a section edit // marker. array_pop($this->sectionedits); } else { $this->finishSectionEdit(); } } if ( count ($this->footnotes) > 0 ) { $this->doc .= '
'.DOKU_LF; $id = 0; foreach ( $this->footnotes as $footnote ) { $id++; // the number of the current footnote // check its not a placeholder that indicates actual footnote text is elsewhere if (substr($footnote, 0, 5) != "@@FNT") { // open the footnote and set the anchor and backlink $this->doc .= '
'; $this->doc .= ''; $this->doc .= $id.') '.DOKU_LF; // get any other footnotes that use the same markup $alt = array_keys($this->footnotes, "@@FNT$id"); if (count($alt)) { foreach ($alt as $ref) { // set anchor and backlink for the other footnotes $this->doc .= ', '; $this->doc .= ($ref+1).') '.DOKU_LF; } } // add footnote markup and close this footnote $this->doc .= $footnote; $this->doc .= '
' . DOKU_LF; } } $this->doc .= '
'.DOKU_LF; } // Prepare the TOC global $conf; if($this->info['toc'] && is_array($this->toc) && $conf['tocminheads'] && count($this->toc) >= $conf['tocminheads']){ global $TOC; $TOC = $this->toc; } // make sure there are no empty paragraphs $this->doc = preg_replace('#

\s*

#','',$this->doc); } } //Setup VIM: ex: et ts=4 enc=utf-8 :