View source for Module:Hatnote
Jump to navigation
Jump to search
You do not have permission to edit this page, for the following reason:
You can view and copy the source of this page.
-- repurposed from --
-- https://en.wikipedia.org/w/index.php?title=Module:Hatnote&oldid=1063743122 --
-- --
-- Implements {{hatnote}} template --
local libraryUtil = require('libraryUtil')
local checkType = libraryUtil.checkType
local p = {}
-- Helper functions --
local function removeInitialColon(s)
-- Removes the initial colon from a string, if present.
return s:match('^:?(.*)')
end
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. Colons
-- are trimmed from the start of the link by default. To skip colon
000
1:0
Return to Module:Hatnote.