Compare commits

...

2 commits

Author SHA1 Message Date
c6f0808313
add citation needed markup
i should really stick this in another file... oh well
2022-02-12 13:56:50 -05:00
d23a632983
Update footnote2.php 2022-01-31 12:16:53 -05:00

View file

@ -59,6 +59,7 @@ SDV($FootnoteBacklinkCharacter, '⇑');
Markup("[^",'<split','/\[\^(.*?)\^\]/s',"Footnote"); Markup("[^",'<split','/\[\^(.*?)\^\]/s',"Footnote");
Markup("checkbox", "inline", "/\[ \]/", "<input type=checkbox class=checkbox disabled>"); Markup("checkbox", "inline", "/\[ \]/", "<input type=checkbox class=checkbox disabled>");
Markup("checkedbox", "inline", "/\[x\]/", "<input type=checkbox class=checkbox disabled checked>"); Markup("checkedbox", "inline", "/\[x\]/", "<input type=checkbox class=checkbox disabled checked>");
Markup("citationneeded", "inline", "/\{\{(cn|[Cc]itation needed)(\|(reason|date)=.+?)?\}\}/", "<sup>[<em>citation needed</em>]</sup>");
function Footnote($m) { function Footnote($m) {
static $fngroup = 1, $fncount = 0, $fntext = array(); static $fngroup = 1, $fncount = 0, $fntext = array();
@ -83,7 +84,7 @@ function Footnote($m) {
} }
$fnid = $fngroup . '_' . $fncount; $fnid = $fngroup . '_' . $fncount;
$out = ($fn_str_parts[2] != '' && $fntext[$fncount] == '#') ? '' : "<sup><a class='footnote' id='fnr$fnid' href='#fn$fnid'>[$fncount]</a></sup>"; $out = (isset($fn_str_parts[2]) && $fn_str_parts[2] != '' && $fntext[$fncount] == '#') ? '' : "<sup><a class='footnote' id='fnr$fnid' href='#fn$fnid'>[$fncount]</a></sup>";
global $FootnoteBacklinkCharacter; global $FootnoteBacklinkCharacter;
if ($fn_str != '') { if ($fn_str != '') {
$fntext[$fncount] = "<div class='footnote' id='fn$fnid'>\n" . $fntext[$fncount] = "<div class='footnote' id='fn$fnid'>\n" .