<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.tiffa.net/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AFootnote</id>
	<title>Module:Footnote - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.tiffa.net/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AFootnote"/>
	<link rel="alternate" type="text/html" href="https://wiki.tiffa.net/w/index.php?title=Module:Footnote&amp;action=history"/>
	<updated>2026-04-17T15:00:48Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://wiki.tiffa.net/w/index.php?title=Module:Footnote&amp;diff=3441&amp;oldid=prev</id>
		<title>imported&gt;Fire: ページの作成:「require(&#039;Module:No globals&#039;);  --[[--------------------------&lt; A R G S _ D E F A U L T &gt;------------------------------------------------------  a table to specify initial…」</title>
		<link rel="alternate" type="text/html" href="https://wiki.tiffa.net/w/index.php?title=Module:Footnote&amp;diff=3441&amp;oldid=prev"/>
		<updated>2021-01-27T06:31:02Z</updated>

		<summary type="html">&lt;p&gt;ページの作成:「require(&amp;#039;Module:No globals&amp;#039;);  --[[--------------------------&amp;lt; A R G S _ D E F A U L T &amp;gt;------------------------------------------------------  a table to specify initial…」&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;require(&amp;#039;Module:No globals&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
--[[--------------------------&amp;lt; A R G S _ D E F A U L T &amp;gt;------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
a table to specify initial values.&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local args_default = {&lt;br /&gt;
	bracket_left = &amp;#039;&amp;#039;,&lt;br /&gt;
	bracket_right = &amp;#039;&amp;#039;,&lt;br /&gt;
	bracket_year_left = &amp;#039;&amp;#039;,&lt;br /&gt;
	bracket_year_right = &amp;#039;&amp;#039;,&lt;br /&gt;
	postscript = &amp;#039;&amp;#039;,&lt;br /&gt;
	page = &amp;#039;&amp;#039;,&lt;br /&gt;
	pages = &amp;#039;&amp;#039;,&lt;br /&gt;
	location = &amp;#039;&amp;#039;,&lt;br /&gt;
	page_sep = &amp;quot;, p.&amp;amp;nbsp;&amp;quot;,&lt;br /&gt;
	pages_sep = &amp;quot;, pp.&amp;amp;nbsp;&amp;quot;,&lt;br /&gt;
	ref = &amp;#039;&amp;#039;,&lt;br /&gt;
	refname = &amp;#039;&amp;#039;,&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[--------------------------&amp;lt; I S _ Y E A R &amp;gt;----------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
evaluates param to see if it is one of these forms with or without lowercase letter disambiguator:&lt;br /&gt;
	YYYY&lt;br /&gt;
	n.d.&lt;br /&gt;
	nd	&lt;br /&gt;
	c. YYYY&lt;br /&gt;
	YYYY–YYYY	(separator is endash)&lt;br /&gt;
	YYYY–YY		(separator is endash)&lt;br /&gt;
&lt;br /&gt;
return true when param has a recognized form; false else&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local function is_year (param)&lt;br /&gt;
	return mw.ustring.match (param, &amp;#039;^%d%d%d%d?%l?$&amp;#039;) or&lt;br /&gt;
		mw.ustring.match (param, &amp;#039;^n%.d%.%l?$&amp;#039;) or&lt;br /&gt;
		mw.ustring.match (param, &amp;#039;^nd%l?$&amp;#039;) or&lt;br /&gt;
		mw.ustring.match (param, &amp;#039;^c%. %d%d%d%d?%l?$&amp;#039;) or&lt;br /&gt;
		mw.ustring.match (param, &amp;#039;^%d%d%d%d–%d%d%d%d%l?$&amp;#039;) or&lt;br /&gt;
		mw.ustring.match (param, &amp;#039;^%d%d%d%d–%d%d%l?$&amp;#039;);&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[--------------------------&amp;lt; C O R E &amp;gt;----------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
returns an anchor link (CITEREF) formed from one to four author names, year, and insource location (|p=, |pp=, loc=)&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local function core( args )&lt;br /&gt;
	local result;&lt;br /&gt;
&lt;br /&gt;
	if args.P5 ~= &amp;#039;&amp;#039; then&lt;br /&gt;
		if is_year (args.P5) then&lt;br /&gt;
			result = table.concat ({args.P1, &amp;#039; et al. &amp;#039;, args.bracket_year_left, args.P5, args.bracket_year_right});&lt;br /&gt;
		else&lt;br /&gt;
			args.P5 = &amp;#039;&amp;#039;;														-- when P5 not a year don&amp;#039;t include in anchor&lt;br /&gt;
			result = table.concat ({args.P1, &amp;#039; et al.&amp;#039;});						-- and don&amp;#039;t render it&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
	elseif args.P4 ~= &amp;#039;&amp;#039; then&lt;br /&gt;
		if is_year (args.P4) then&lt;br /&gt;
			result = table.concat ({args.P1, &amp;#039;, &amp;#039;, args.P2, &amp;#039; &amp;amp;amp; &amp;#039;, args.P3, &amp;#039; &amp;#039;, args.bracket_year_left, args.P4, args.bracket_year_right});	-- three names and a year&lt;br /&gt;
		else&lt;br /&gt;
			result = table.concat ({args.P1, &amp;#039; et al.&amp;#039;});						-- four names&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
	elseif args.P3 ~= &amp;#039;&amp;#039; then&lt;br /&gt;
		if is_year (args.P3) then&lt;br /&gt;
			result = table.concat ({args.P1, &amp;#039; &amp;amp;amp; &amp;#039;, args.P2, &amp;#039; &amp;#039;, args.bracket_year_left, args.P3, args.bracket_year_right});	-- two names and a year&lt;br /&gt;
		else&lt;br /&gt;
			result = table.concat ({args.P1, &amp;#039;, &amp;#039;, args.P2, &amp;#039; &amp;#039;, &amp;#039; &amp;amp;amp; &amp;#039;, args.P3});	-- three names&lt;br /&gt;
		end&lt;br /&gt;
			&lt;br /&gt;
	elseif args.P2 ~= &amp;#039;&amp;#039; then&lt;br /&gt;
		if is_year (args.P2) then&lt;br /&gt;
			result = table.concat ({args.P1, &amp;#039; &amp;#039;, args.bracket_year_left, args.P2, args.bracket_year_right});	-- one name and year&lt;br /&gt;
		else&lt;br /&gt;
			result = table.concat ({args.P1, &amp;#039; &amp;amp;amp; &amp;#039;, args.P2});				-- two names&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
	else&lt;br /&gt;
		result = args.P1;														-- one name&lt;br /&gt;
	end&lt;br /&gt;
																				-- when author-date result ends with a dot (typically when the last positional parameter holds &amp;#039;n.d.&amp;#039;)&lt;br /&gt;
																				-- and when no in-source location (no |p=, |pp=, or |loc=)&lt;br /&gt;
																				-- and when the first or only character in args.postscript is a dot&lt;br /&gt;
																				-- remove the author-date result trailing dot&lt;br /&gt;
																				-- the author-date result trailing dot will be replaced later with the content of args.postscript (usually a dot)&lt;br /&gt;
	if (&amp;#039;.&amp;#039; == result:sub(-1)) and (&amp;#039;.&amp;#039; == args.postscript:sub(1)) and (&amp;#039;&amp;#039; == args.page) and (&amp;#039;&amp;#039; == args.pages) and (&amp;#039;&amp;#039; == args.location) then&lt;br /&gt;
		result = result:gsub (&amp;#039;%.$&amp;#039;, &amp;#039;&amp;#039;);&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if args.ref ~= &amp;#039;none&amp;#039; then&lt;br /&gt;
		if args.ref ~= &amp;#039;&amp;#039; then&lt;br /&gt;
			result = table.concat ({&amp;#039;[[#&amp;#039;, mw.uri.anchorEncode (args.ref), &amp;#039;|&amp;#039;, result, &amp;#039;]]&amp;#039;});&lt;br /&gt;
		else&lt;br /&gt;
			result = table.concat ({&amp;#039;[[#CITEREF&amp;#039;, mw.uri.anchorEncode (table.concat ({args.P1, args.P2, args.P3, args.P4, args.P5})), &amp;#039;|&amp;#039;, result, &amp;#039;]]&amp;#039;});&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if args.page ~= &amp;#039;&amp;#039; then&lt;br /&gt;
		result = table.concat ({result, args.page_sep, args.page});&lt;br /&gt;
	elseif args.pages ~= &amp;#039;&amp;#039; then&lt;br /&gt;
		result = table.concat ({result, args.pages_sep, args.pages});&lt;br /&gt;
	end      &lt;br /&gt;
&lt;br /&gt;
	if args.location ~= &amp;#039;&amp;#039; then&lt;br /&gt;
		result = table.concat ({result, &amp;#039;, &amp;#039;, args.location});&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	result = table.concat ({args.bracket_left, result, args.bracket_right, args.postscript}):gsub (&amp;#039;%s+&amp;#039;, &amp;#039; &amp;#039;);		-- strip redundant spaces&lt;br /&gt;
	return result;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[--------------------------&amp;lt; A R G S  _ F E T C H &amp;gt;---------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
Because all of the templates share a common set of parameters, a single common function to fetch those parameters&lt;br /&gt;
from frame and parent frame.&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local function args_fetch (frame, ps)&lt;br /&gt;
	local args = args_default;													-- create a copy of the default table&lt;br /&gt;
	local pframe = frame:getParent();											-- point to the template&amp;#039;s parameter table&lt;br /&gt;
&lt;br /&gt;
	for k, v in pairs (frame.args) do											-- override defaults with values provided in the #invoke: if any&lt;br /&gt;
		args[k] = v;	   &lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	args.postscript = pframe.args.postscript or pframe.args.ps or ps;&lt;br /&gt;
	if &amp;#039;none&amp;#039; == args.postscript then&lt;br /&gt;
		args.postscript = &amp;#039;&amp;#039;;&lt;br /&gt;
	end&lt;br /&gt;
	args.page = pframe.args.p or pframe.args.page or &amp;#039;&amp;#039;;&lt;br /&gt;
	args.pages = pframe.args.pp or pframe.args.pages or &amp;#039;&amp;#039;;&lt;br /&gt;
	args.location = pframe.args.loc or &amp;#039;&amp;#039;;&lt;br /&gt;
	args.ref = pframe.args.ref or pframe.args.Ref or &amp;#039;&amp;#039;;&lt;br /&gt;
	args.refname = pframe.args.refname or &amp;#039;&amp;#039;;&lt;br /&gt;
	&lt;br /&gt;
	for i, v in ipairs ({&amp;#039;P1&amp;#039;, &amp;#039;P2&amp;#039;, &amp;#039;P3&amp;#039;, &amp;#039;P4&amp;#039;, &amp;#039;P5&amp;#039;}) do						-- loop through the five positional parameters and trim if set else empty string&lt;br /&gt;
		args[v] = (pframe.args[i] and mw.text.trim (pframe.args[i])) or &amp;#039;&amp;#039;;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return args;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[--------------------------&amp;lt; H A R V A R D _ C I T A T I O N &amp;gt;----------------------------------------------&lt;br /&gt;
&lt;br /&gt;
common entry point for:&lt;br /&gt;
	{{harvard citation}} aka {{harv}}&lt;br /&gt;
	{{Harvard citation no brackets}} aka {{harvnb}}&lt;br /&gt;
	{{harvcol}}&lt;br /&gt;
	{{harvcolnb}}&lt;br /&gt;
	{{harvcoltxt}}&lt;br /&gt;
	{{Harvard citation text}} aka {{harvtxt}}&lt;br /&gt;
	{{Harvp}}&lt;br /&gt;
&lt;br /&gt;
Distinguishing features (brackets and page separators) are specified in this module&amp;#039;s {{#invoke}} in the respective templates.&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local function harvard_citation (frame)&lt;br /&gt;
	local args = args_fetch (frame, &amp;#039;&amp;#039;);										-- get the template and invoke parameters; default postscript is empty string&lt;br /&gt;
&lt;br /&gt;
	return core (args);&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[--------------------------&amp;lt; S T R I P _ U R L &amp;gt;------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
used by sfn() and sfnm().  This function fixes an issue with reference tooltip gadget where the tooltip is not displayed&lt;br /&gt;
when an insource locator (|p=, |pp=, |loc=) has an external wikilink that contains a # character&lt;br /&gt;
&lt;br /&gt;
strip uri-reserved characters from urls in |p=, |pp-, and |loc= parameters  The researved characters are:&lt;br /&gt;
	!#$&amp;amp;&amp;#039;()*+,/:;=?@[]&lt;br /&gt;
	&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local function strip_url (pages)&lt;br /&gt;
	local escaped_uri;&lt;br /&gt;
	if not pages or (&amp;#039;&amp;#039; == pages) then&lt;br /&gt;
		return pages;&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	for uri in pages:gmatch (&amp;#039;%[(%a[%w%+%.%-]*://%S+)&amp;#039;) do						-- for each external link get the uri&lt;br /&gt;
		escaped_uri = uri:gsub (&amp;quot;([%(%)%.%%%+%-%*%?%[%^%$%]])&amp;quot;, &amp;quot;%%%1&amp;quot; );		-- save a copy with lua pattern characters escaped&lt;br /&gt;
		uri = uri:gsub (&amp;quot;[!#%$&amp;amp;&amp;#039;%(%)%*%+,/:;=%?@%[%]%.%%]&amp;quot;, &amp;#039;&amp;#039;);				-- remove reserved characters and &amp;#039;%&amp;#039; because &amp;#039;%20&amp;#039; (space character) is a lua &amp;#039;invalid capture index&amp;#039;&lt;br /&gt;
		pages = pages:gsub (escaped_uri, uri, 1);								-- replace original uri with the stripped version&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return pages;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[--------------------------&amp;lt; S F N &amp;gt;------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
entry point for {{sfn}} and {{sfnp}}&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local function sfn (frame)&lt;br /&gt;
	local args = args_fetch (frame, &amp;#039;.&amp;#039;);										-- get the template and invoke parameters; default postscript is a dot&lt;br /&gt;
&lt;br /&gt;
	local result = core (args);													-- go make a CITEREF anchor&lt;br /&gt;
	&lt;br /&gt;
																				-- put it all together and then strip redundant spaces&lt;br /&gt;
	local name;&lt;br /&gt;
	if args.refname ~= &amp;#039;&amp;#039; then&lt;br /&gt;
		name = table.concat ({&amp;#039;FOOTNOTE&amp;#039;, args.refname}):gsub (&amp;#039;%s+&amp;#039;, &amp;#039; &amp;#039;);&lt;br /&gt;
	else&lt;br /&gt;
		name = table.concat ({&amp;#039;FOOTNOTE&amp;#039;, args.P1, args.P2, args.P3, args.P4, args.P5, args.page, args.pages, args.location}):gsub (&amp;#039;%s+&amp;#039;, &amp;#039; &amp;#039;);&lt;br /&gt;
		name = mw.uri.anchorEncode(name);&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return frame:extensionTag ({name=&amp;#039;ref&amp;#039;, args={name=name}, content=result});	&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[--------------------------&amp;lt; S F N M &amp;gt;----------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
common entry point for {{sfnm}} and {{sfnmp}}&lt;br /&gt;
&lt;br /&gt;
Distinguishing features (brackets) are specified in this module&amp;#039;s {{#invoke}} in the respective templates.&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local function sfnm (frame)&lt;br /&gt;
	local args = args_default;													-- create a copy of the default table&lt;br /&gt;
	local pframe = frame:getParent();											-- point to the template&amp;#039;s parameter table&lt;br /&gt;
	&lt;br /&gt;
	local n = 1;																-- index of source; this is the &amp;#039;n&amp;#039; in na1, ny, etc&lt;br /&gt;
	local first_pnum = 1;														-- first of a pair of positional parameters&lt;br /&gt;
	local second_pnum = 2;														-- second of a pair of positional parameters&lt;br /&gt;
&lt;br /&gt;
	local last_ps = 0;															-- index of the last source with |nps= set&lt;br /&gt;
	local last_index = 0;														-- index of the last source; these used to determine which of |ps= or |nps= will terminate the whole rendering&lt;br /&gt;
&lt;br /&gt;
	local out = {};																-- table to hold rendered sources&lt;br /&gt;
	local footnote = {&amp;#039;FOOTNOTE&amp;#039;};												-- all author, date, insource location stuff becomes part of the reference&amp;#039;s footnote id; added as we go&lt;br /&gt;
&lt;br /&gt;
	for k, v in pairs (frame.args) do											-- override defaults with values provided in the #invoke: if any&lt;br /&gt;
		args[k] = v;	   &lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	while true do&lt;br /&gt;
		if not pframe.args[table.concat ({n, &amp;#039;a1&amp;#039;})] and not pframe.args[first_pnum] then&lt;br /&gt;
			break;																-- no na1 or matching positional parameter so done&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		if pframe.args[table.concat ({n, &amp;#039;a1&amp;#039;})] then							-- does this source use named parameters?&lt;br /&gt;
			for _, v in ipairs ({&amp;#039;P1&amp;#039;, &amp;#039;P2&amp;#039;, &amp;#039;P3&amp;#039;, &amp;#039;P4&amp;#039;, &amp;#039;P5&amp;#039;}) do				-- initialize for this source&lt;br /&gt;
				args[v] = &amp;#039;&amp;#039;;&lt;br /&gt;
			end&lt;br /&gt;
&lt;br /&gt;
			for i, v in ipairs ({&amp;#039;P1&amp;#039;, &amp;#039;P2&amp;#039;, &amp;#039;P3&amp;#039;, &amp;#039;P4&amp;#039;, &amp;#039;P5&amp;#039;}) do				-- extract author and year parameters for this source&lt;br /&gt;
				args[v] = pframe.args[table.concat ({n, &amp;#039;a&amp;#039;, i})] or &amp;#039;&amp;#039;;		-- attempt to assign author name&lt;br /&gt;
				if &amp;#039;&amp;#039; == args[v] then											-- when there wasn&amp;#039;t an author name&lt;br /&gt;
					args[v] = pframe.args[table.concat ({n, &amp;#039;y&amp;#039;})] or &amp;#039;&amp;#039;;		-- attempt to assign year&lt;br /&gt;
					break;														-- done with author/date for this source&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
&lt;br /&gt;
		else																	-- this source uses positional parameters&lt;br /&gt;
			args.P1 = mw.text.trim (pframe.args[first_pnum]);					-- yes, only one author supported&lt;br /&gt;
			args.P2 = (pframe.args[second_pnum] and mw.text.trim (pframe.args[second_pnum])) or &amp;#039;&amp;#039;;	-- when positional author, year must also be positional&lt;br /&gt;
&lt;br /&gt;
			for _, v in ipairs ({&amp;#039;P3&amp;#039;, &amp;#039;P4&amp;#039;, &amp;#039;P5&amp;#039;}) do							-- blank the rest of these for this source&lt;br /&gt;
				args[v] = &amp;#039;&amp;#039;;&lt;br /&gt;
			end&lt;br /&gt;
&lt;br /&gt;
			first_pnum = first_pnum + 2;										-- source must use positional author and positional year&lt;br /&gt;
			second_pnum = first_pnum + 1;										-- bump these for possible next positional source&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		args.postscript = pframe.args[table.concat ({n, &amp;#039;ps&amp;#039;})] or &amp;#039;&amp;#039;;&lt;br /&gt;
		if &amp;#039;none&amp;#039; == args.postscript then										-- this for compatibility with other footnote templates; does nothing&lt;br /&gt;
			args.postscript = &amp;#039;&amp;#039;;&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		args.ref = pframe.args[table.concat ({n, &amp;#039;ref&amp;#039;})] or &amp;#039;&amp;#039;;				-- alternate reference for this source&lt;br /&gt;
&lt;br /&gt;
		args.page = pframe.args[table.concat ({n, &amp;#039;p&amp;#039;})] or &amp;#039;&amp;#039;;					-- insource locations for this source&lt;br /&gt;
		args.pages = pframe.args[table.concat ({n, &amp;#039;pp&amp;#039;})] or &amp;#039;&amp;#039;;&lt;br /&gt;
		args.location = pframe.args[table.concat ({n, &amp;#039;loc&amp;#039;})] or &amp;#039;&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
		table.insert (out, core (args));										-- save the rendering of this source&lt;br /&gt;
		&lt;br /&gt;
		for k, v in ipairs ({&amp;#039;P1&amp;#039;, &amp;#039;P2&amp;#039;, &amp;#039;P3&amp;#039;, &amp;#039;P4&amp;#039;, &amp;#039;P5&amp;#039;}) do					-- create the FOOTNOTE id&lt;br /&gt;
			if &amp;#039;&amp;#039; ~= args[v] then&lt;br /&gt;
				table.insert (footnote, args[v]);&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		for k, v in ipairs ({&amp;#039;page&amp;#039;, &amp;#039;pages&amp;#039;, &amp;#039;location&amp;#039;}) do					-- these done separately so that we can strip uri-reserved characters from extlinked page numbers &lt;br /&gt;
			if &amp;#039;&amp;#039; ~= args[v] then&lt;br /&gt;
				table.insert (footnote, strip_url (args[v]))&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		last_index = n;															-- flags used to select terminal postscript from nps or from end_ps&lt;br /&gt;
		if &amp;#039;&amp;#039; ~= args.postscript then							&lt;br /&gt;
			last_ps = n;&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		n = n+1;																-- bump for the next one&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local name = table.concat (footnote):gsub (&amp;#039;%s+&amp;#039;, &amp;#039; &amp;#039;);						-- put the footnote together and strip redundant space&lt;br /&gt;
	&lt;br /&gt;
	args.end_ps = pframe.args.postscript or pframe.args.ps or &amp;#039;.&amp;#039;;				-- this is the postscript for the whole not for the individual sources&lt;br /&gt;
	if &amp;#039;none&amp;#039; == args.end_ps then												-- not an original sfnm parameter value; added for compatibility with other footnote templates&lt;br /&gt;
		args.end_ps = &amp;#039;&amp;#039;;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local result = table.concat ({table.concat (out, &amp;#039;; &amp;#039;), (last_index == last_ps) and &amp;#039;&amp;#039; or  args.end_ps});&lt;br /&gt;
	return frame:extensionTag ({name=&amp;#039;ref&amp;#039;, args={name=name}, content=result});&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[--------------------------&amp;lt; E X P O R T   T A B L E &amp;gt;------------------------------------------------------&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
return {&lt;br /&gt;
	harvard_citation = harvard_citation,&lt;br /&gt;
	sfn = sfn,&lt;br /&gt;
	sfnm = sfnm,&lt;br /&gt;
	}&lt;/div&gt;</summary>
		<author><name>imported&gt;Fire</name></author>
	</entry>
</feed>