links', '/\[\^(.*?)\^\]/e', "Footnote('$1')" ); Markup( "FootnoteList", ''.Footnote('#')" ); Markup( "EndnoteList", ''.Footnote('@')" ); function Footnote( $foottext ) { static $fngroup, $fncount, $fntext; ## Modify script to make blue line only appear if footnotes actually exist if ($foottext == "#") { $fngroup++; if ($fncount > 0) { $r = "
 
$fntext"; } $fncount = 0; $fntext = ''; } else if ($foottext == "@") { if ($fncount > 0) { $r = "$fntext"; } $fntext = ''; $fncount = 0; $fngroup++; } else { $fncount++; $fnid = $fngroup+1 . '_' . $fncount; if ($fncount > 0) { $r = "$fncount". ""; $foottext = stripslashes( $foottext ); $fntext .= "

"; $fntext .= "$fncount $foottext

"; } } return $r; }