Zum Inhalt springen

Modul:Hatnote: Unterschied zwischen den Versionen

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)
Zeile 113: Zeile 113:
return p.makeWikitextError('no link specified')
return p.makeWikitextError('no link specified')
end
end
return p.formatLink(link, display)
return p._formatLink(link, display)
end
end


function p.formatLink(link, display)
function p._formatLink(link, display)
-- Find whether we need to use the colon trick or not. We need to use the
-- 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
-- colon trick for categories and files, as otherwise category links
-- categorise the page and file links display the file.
-- categorise the page and file links display the file.
checkType('formatLink', 1, link, 'string')
checkType('_formatLink', 1, link, 'string')
checkType('formatLink', 2, display, 'string', true)
checkType('_formatLink', 2, display, 'string', true)
link = removeInitialColon(link)
link = removeInitialColon(link)
local namespace = p.findNamespaceId(link, false)
local namespace = p.findNamespaceId(link, false)
Anonymer Benutzer