Changes

Jump to navigation Jump to search

Module:Hatnote

37 bytes added, 12:24, 24 April 2014
trim colons in findNamespaceId by default
function p._findNamespaceId(link, removeColon)
-- Finds the namespace id (namespace number) of a link or a pagename. This
-- function will not work if the link is enclosed in double brackets. If theColons -- removeColon parameter is set to true, are trimmed from the start of the function will remove initiallink by default. To skip colon -- colons from trimming, set the linkremoveColon parameter to true.
checkType('_findNamespaceId', 1, link, 'string')
checkType('_findNamespaceId', 2, removeColon, 'boolean', true)
if removeColon ~= false then
link = removeInitialColon(link)
end
checkType('_formatLink', 2, display, 'string', true)
link = removeInitialColon(link)
local namespace = p._findNamespaceId(link, false)
local colon
if namespace == 6 or namespace == 14 then
Anonymous user

Navigation menu