Module:Hatnote: Difference between revisions

Jump to navigation Jump to search
move formatLink back to the underscore - that one is necessary
(make makeWikitextError use Module:Yesno to parse the demo parameter, and remove underscores from all the function names, as that's normally done for private functions, whereas these are public)
(move formatLink back to the underscore - that one is necessary)
Line 113:
return p.makeWikitextError('no link specified')
end
return p.formatLink_formatLink(link, display)
end
 
function p.formatLink_formatLink(link, display)
-- Find whether we need to use the colon trick or not. We need to use the
-- colon trick for categories and files, as otherwise category links
-- categorise the page and file links display the file.
checkType('formatLink_formatLink', 1, link, 'string')
checkType('formatLink_formatLink', 2, display, 'string', true)
link = removeInitialColon(link)
local namespace = p.findNamespaceId(link, false)
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu