Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:Dabs

From Tardis Wiki, the free Doctor Who reference
Revision as of 12:10, 24 June 2022 by Bongolium500 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Documentation for this module may be created at Module:Dabs/doc

--some functions related to processing page name's disambiguation terms
local util_link = require('Module:LinkUtil')
local p = {} --p stands for package

function p.italDab(frame)
	local args = frame:getParent().args
	local page = util_link.stripLink(args[1])
	local name = util_link.stripDab(page)
	local dab = util_link.getDab(page)
	local display = name .. " (''" .. dab .. "'')"
	if args[2] then
		local link = util_link.addLink(page, display)
		return link
	else
		return display
	end
end

function p.getDab(frame)
	local args = frame:getParent().args
	local dab = util_link.getDab(args[1])
	return dab
end

return p
Cookies help us deliver our services. By using our services, you agree to our use of cookies.