Documentation for this module may be created at Module:Pagenamebase/doc
--<nowiki>
--
-- lightweight substitute for wikipedias Template:PAGENAMEBASE
-- removes the disambiguation part from a title, if there is one. So both
-- {{#invoke:Pagenamebase|main|foo (bar)}}
-- and
-- {{#invoke:Pagenamebase|main|foo}}
-- will expand to the string "foo".
local pagenamebase = {}
function pagenamebase.main(frame)
local title = frame.args[1]
return (title:gsub("%s*%(.*", ""))
end
return pagenamebase
--</nowiki>