Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a23c40e7bb2036cd

Jump to content

Wikipedia:Footnote3/numlink2note.pl

From Wikipedia, the free encyclopedia
$ref=0;
@urls=();
while ( <> ) {
    while ( ($before,$url,$after) = m/(^|.*?[^[])\[([a-z][a-z0-9]+:[^][ ]+)\](.*)/i ) {
	$ref++;
	print $before, "{{ref|$ref}}";
	$_ = $after;
	push @urls, $url;
    };
    print $_;
}

print "\n\n==Notes==\n\n";
print "<!-- please replace numbered notes with names and remove this line-->\n";

$endnote=0;
foreach (@urls) {
  $endnote++;
  print "# {{note|$endnote}} $_\n";
}

print STDERR "printed $ref references and $endnote endnotes .. should be the same\n";