<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://pool.calebcooper.ie/index.php?action=history&amp;feed=atom&amp;title=Module%3AMulti-section_link</id>
	<title>Module:Multi-section link - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://pool.calebcooper.ie/index.php?action=history&amp;feed=atom&amp;title=Module%3AMulti-section_link"/>
	<link rel="alternate" type="text/html" href="https://pool.calebcooper.ie/index.php?title=Module:Multi-section_link&amp;action=history"/>
	<updated>2026-04-09T11:29:23Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://pool.calebcooper.ie/index.php?title=Module:Multi-section_link&amp;diff=15237&amp;oldid=prev</id>
		<title>Caleb Cooper: Created page with &quot;-- This module creates a section link with multiple section names.  local p = {}  local function normalizePageName(page) 	local title = mw.title.new(page) 	if not title then...&quot;</title>
		<link rel="alternate" type="text/html" href="https://pool.calebcooper.ie/index.php?title=Module:Multi-section_link&amp;diff=15237&amp;oldid=prev"/>
		<updated>2020-11-03T17:43:08Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;-- This module creates a section link with multiple section names.  local p = {}  local function normalizePageName(page) 	local title = mw.title.new(page) 	if not title then...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- This module creates a section link with multiple section names.&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
local function normalizePageName(page)&lt;br /&gt;
	local title = mw.title.new(page)&lt;br /&gt;
	if not title then&lt;br /&gt;
		error(string.format(&amp;quot;&amp;#039;%s&amp;#039; is not a valid page name&amp;quot;, page), 3)&lt;br /&gt;
	elseif title.namespace == 6 or title.namespace == 14 then&lt;br /&gt;
		return &amp;#039;:&amp;#039; .. title.prefixedText&lt;br /&gt;
	else&lt;br /&gt;
		return title.prefixedText&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._main(args)&lt;br /&gt;
	local displayParts = {}&lt;br /&gt;
	for i, v in ipairs(args) do&lt;br /&gt;
		displayParts[i] = v&lt;br /&gt;
	end&lt;br /&gt;
	local nParts = #displayParts&lt;br /&gt;
	if nParts &amp;lt; 1 then&lt;br /&gt;
		error(&amp;#039;no page name found in parameter |1=&amp;#039;, 2)&lt;br /&gt;
	elseif nParts == 1 then&lt;br /&gt;
		return string.format(&amp;#039;[[%s]]&amp;#039;, normalizePageName(displayParts[1]))&lt;br /&gt;
	else&lt;br /&gt;
		local display = {}&lt;br /&gt;
		for i, s in ipairs(displayParts) do&lt;br /&gt;
			table.insert(display, s)&lt;br /&gt;
			if i ~= nParts then&lt;br /&gt;
				table.insert(display, &amp;#039; &amp;#039;)&lt;br /&gt;
				table.insert(display, string.rep(&amp;#039;§&amp;#039;, i))&lt;br /&gt;
				table.insert(display, &amp;#039;&amp;amp;nbsp;&amp;#039;)&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		display = table.concat(display)&lt;br /&gt;
		local page = normalizePageName(displayParts[1])&lt;br /&gt;
		local fragment = displayParts[nParts]&lt;br /&gt;
		return string.format(&amp;#039;[[%s#%s|%s]]&amp;#039;, page, fragment, display)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local args = require(&amp;#039;Module:Arguments&amp;#039;).getArgs(frame, {&lt;br /&gt;
		wrappers = &amp;#039;Template:Multi-section link&amp;#039;&lt;br /&gt;
	})&lt;br /&gt;
	return p._main(args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Caleb Cooper</name></author>
	</entry>
</feed>