模組:LoadPage

local p = {}

function p.loadpage(page)
	local page_name = page
	if type(page) == type({}) then page_name = (page.args or page)[1]
	elseif type(page) == type(nil) then return ''
	elseif type(page) ~= type("string") then page_name = tostring(page) end
	page_name = tostring(page_name or '')
	if mw.text.trim(page_name) ~= '' then
		local title_obj = mw.title.new(page_name)
		pcall(title_obj.getContent, title_obj)
	end
	return ''
end

return p