Skip to content
Snippets Groups Projects
Commit 7764a90a authored by andi's avatar andi
Browse files

footnotes fixed #277 #278

darcs-hash:20050426185630-9977f-908f1a39cd91cbe0cf5109db0e421a9806c47c41.gz
parent 27a2b085
No related branches found
No related tags found
No related merge requests found
......@@ -31,8 +31,6 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
var $footnotes = array();
var $footnoteIdStack = array();
var $acronyms = array();
var $smileys = array();
var $badwords = array();
......@@ -41,6 +39,9 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
var $lastsec = 0;
var $store = '';
function document_start() {
}
......@@ -195,19 +196,33 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
function footnote_open() {
$id = $this->_newFootnoteId();
$this->doc .= '<a href="#fn'.$id.'" name="fnt'.$id.'" class="fn_top">'.$id.')</a>';
$this->footnoteIdStack[] = $id;
ob_start();
// move current content to store and record footnote
$this->store = $this->doc;
$this->doc = '';
$this->doc .= '<div class="fn">';
$this->doc .= '<a href="#fnt'.$id.'" name="fn'.$id.'" class="fn_bot">';
$this->doc .= $id.')</a> '.DOKU_LF;
}
function footnote_close() {
$contents = ob_get_contents();
ob_end_clean();
$id = array_pop($this->footnoteIdStack);
# $contents = ob_get_contents();
# ob_end_clean();
# $id = array_pop($this->footnoteIdStack);
$contents = '<div class="fn"><a href="#fnt'.
$id.'" name="fn'.$id.'" class="fn_bot">'.
$id.')</a> ' .DOKU_LF .$contents. "\n" . '</div>' . DOKU_LF;
$this->footnotes[$id] = $contents;
# $contents = '<div class="fn"><a href="#fnt'.
# $id.'" name="fn'.$id.'" class="fn_bot">'.
# $id.')</a> ' .DOKU_LF .$contents. "\n" . '</div>' . DOKU_LF;
# $this->footnotes[$id] = $contents;
$this->doc .= '</div>' . DOKU_LF;
// put recorded footnote into the stack and restore old content
$this->footnotes[count($this->footnotes)] = $this->doc;
$this->doc = $this->store;
$this->store = '';
}
function listu_open() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment