[pmwiki-users] MarkupExtension - FootNotes problem
Peter Brink
peter.brink at brinkdata.se
Fri Aug 26 11:31:21 CDT 2005
I'm making extensive use of footnotes on a FAQ page of mine (see for
example http://faq.rollspelshornan.se/FAQ/Immaterialr%e4tt#toc17), when
I began using footnotes (in May) I had no trouble, but today I noticed
that the footnotes are not linked to the correct note. The same behavior
can be seen on http://www.pmwiki.org/wiki/Cookbook/MarkupExtension. I
can't really recall but I think that the footnotes worked a few weeks
ago when I last tested a new entry to the FAQ.
The problem:
------------
If you click on footnote 1 in my document you will be moved to the first
#1 footnote in the document and not to the correct list of notes. If you
try the page at pmwiki.org you'll see that all #1's, #2's and #3's point
to the same notes while #4 and #5 points to the correct notes. Since I
have quite a few sets of footnotes, the footnotes on my page are at the
present an utter mess.
The first question is (obviously) is it supposed to work? I know that
I've tested the footnotes a few weeks ago but that might have been high
numbers that works because there are no other such numbers in the
document.
The relevant function in extendedmarkup.php reads:
function Footnote($foottext) {
static $fncount, $fntext;
if ($foottext == "#") {
$fncount = 0;
$r = "<div class='footnote'> </div>$fntext";
$fntext = '';
} else {
$fncount++;
$r = "<a name='fnr$fncount' id='fnr$fncount'></a>".
"<sup><a href='#fn$fncount'>$fncount</a></sup>";
$foottext = stripslashes($foottext);
$fntext .= "<p class='footnote'><a name='fn$fncount'
id='fn$fncount'></a>".
"<sup>(<a href='#fnr$fncount'> $fncount</a>)</sup> $foottext</p>";
}
return $r;
}
I use pmwiki-2.0.beta35. But since pmwiki.org seems to have the same
trouble I somewhat hesitant to upgrade, before having an idea of whats
going on.
/Peter
More information about the pmwiki-users
mailing list