protected function doFootnotes($text)
{
#
# Replace footnote references in $text [^id] with a special text-token
# which will be replaced by the actual footnote marker in appendFootnotes.
#
if (!$this->in_anchor) {
$text = preg_replace('{\\[\\^(.+?)\\]}', "Ffn:\\1:", $text);
}
return $text;
}